github

package
v1.235.0-nightly.44967... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: Apache-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package github implements GitHub's pull-request API as a git publishing provider.

Index

Constants

View Source
const ProviderName = "github"

ProviderName identifies the GitHub pull request publisher.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider reconciles pull requests through GitHub's REST API.

func New

func New() *Provider

New creates a GitHub pull request provider using the configured CI token.

func NewWithClientFactory

func NewWithClientFactory(factory func() (client, error)) *Provider

NewWithClientFactory exists for fake HTTP client tests without exposing the go-github dependency to caller packages.

func (*Provider) PullRequestBodyBadge added in v1.229.0

func (p *Provider) PullRequestBodyBadge() string

PullRequestBodyBadge implements atmosgit.PullRequestBodyBadger.

func (*Provider) Reconcile

Reconcile creates or updates a pull request and applies configured metadata.

func (*Provider) RepositoryFromURL

func (p *Provider) RepositoryFromURL(uri string) (atmosgit.PullRequestRepository, bool)

RepositoryFromURL recognizes remotes on the GitHub host this provider's API client talks to over HTTPS or SSH and returns their owner/repository: github.com by default, or the Enterprise Server host named by GITHUB_SERVER_URL. Only that one host is claimed, so a resolved repository is always one the client can reach. Ports are ignored, matching atmosgit.GitHubRepository, since scp-style SSH remotes carry none.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL