Documentation ¶
Index ¶
- func GetAPIToken(gitConfig gitTownConfig) string
- type Connector
- func (self *Connector) DefaultProposalMessage(proposal domain.Proposal) string
- func (self *Connector) FindProposal(branch, target domain.LocalBranchName) (*domain.Proposal, error)
- func (self *Connector) HostingServiceName() string
- func (self *Connector) NewProposalURL(branch, parentBranch domain.LocalBranchName) (string, error)
- func (self *Connector) RepositoryURL() string
- func (self *Connector) SquashMergeProposal(number int, message string) (mergeSHA domain.SHA, err error)
- func (self *Connector) UpdateProposalTarget(number int, target domain.LocalBranchName) error
- type NewConnectorArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAPIToken ¶
func GetAPIToken(gitConfig gitTownConfig) string
getGitHubApiToken returns the GitHub API token to use. It first checks the GITHUB_TOKEN environment variable. If that is not set, it checks the GITHUB_AUTH_TOKEN environment variable. If that is not set, it checks the git config.
Types ¶
type Connector ¶
type Connector struct { common.Config MainBranch domain.LocalBranchName // contains filtered or unexported fields }
Connector provides standardized connectivity for the given repository (github.com/owner/repo) via the GitHub API.
func NewConnector ¶
func NewConnector(args NewConnectorArgs) (*Connector, error)
NewConnector provides a fully configured GithubConnector instance if the current repo is hosted on Github, otherwise nil.
func (*Connector) DefaultProposalMessage ¶
func (*Connector) FindProposal ¶
func (*Connector) HostingServiceName ¶
func (*Connector) NewProposalURL ¶
func (self *Connector) NewProposalURL(branch, parentBranch domain.LocalBranchName) (string, error)
func (*Connector) RepositoryURL ¶
func (*Connector) SquashMergeProposal ¶
func (*Connector) UpdateProposalTarget ¶
func (self *Connector) UpdateProposalTarget(number int, target domain.LocalBranchName) error
Click to show internal directories.
Click to hide internal directories.