 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context interface {
	AuthToken() (string, error)
	SetAuthToken(string)
	Branch() (string, error)
	SetBranch(string)
	Remotes() (Remotes, error)
	BaseRepo() (ghrepo.Interface, error)
	SetBaseRepo(string)
	Config() (config.Config, error)
}
    Context represents the interface for querying information about the current environment
type Remote ¶
Remote represents a git remote mapped to a GitHub repository
type Remotes ¶
type Remotes []*Remote
Remotes represents a set of git remotes
func (Remotes) FindByName ¶
FindByName returns the first Remote whose name matches the list
func (Remotes) FindByRepo ¶
FindByRepo returns the first Remote that points to a specific GitHub repository
type ResolvedRemotes ¶ added in v0.5.5
type ResolvedRemotes struct {
	BaseOverride ghrepo.Interface
	Remotes      Remotes
	Network      api.RepoNetworkResult
	// contains filtered or unexported fields
}
    func ResolveRemotesToRepos ¶ added in v0.5.5
func ResolveRemotesToRepos(remotes Remotes, client *api.Client, base string) (ResolvedRemotes, error)
ResolveRemotesToRepos takes in a list of git remotes and fetches more information about the repositories they map to. Only the git remotes belonging to the same hostname are ever looked up; all others are ignored.
func (ResolvedRemotes) BaseRepo ¶ added in v0.5.5
func (r ResolvedRemotes) BaseRepo() (*api.Repository, error)
BaseRepo is the first found repository in the "upstream", "github", "origin" git remote order, resolved to the parent repo if the git remote points to a fork
func (ResolvedRemotes) HeadRepo ¶ added in v0.5.5
func (r ResolvedRemotes) HeadRepo() (*api.Repository, error)
HeadRepo is a fork of base repo (if any), or the first found repository that has push access
func (ResolvedRemotes) RemoteForRepo ¶ added in v0.5.5
func (r ResolvedRemotes) RemoteForRepo(repo ghrepo.Interface) (*Remote, error)
RemoteForRepo finds the git remote that points to a repository