Documentation
¶
Index ¶
- type Github
- func (g Github) ClosePullRequest(ctx context.Context, pullReq domain.PullRequest) error
- func (g Github) CreatePullRequest(ctx context.Context, repo domain.Repository, newPR domain.NewPullRequest) (domain.PullRequest, error)
- func (g Github) GetPullRequestStatuses(ctx context.Context, branchName string) ([]domain.PullRequest, error)
- func (g Github) GetRepositories(ctx context.Context) ([]domain.Repository, error)
- func (g Github) MergePullRequest(ctx context.Context, pullReq domain.PullRequest) error
- type RepositoryListing
- type RepositoryReference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Github ¶
type Github struct {
RepositoryListing
MergeTypes []domain.MergeType
// contains filtered or unexported fields
}
Github contain github configuration
func New ¶
func New(token, baseURL string, repoListing RepositoryListing, mergeTypes []domain.MergeType) (*Github, error)
New create a new Github client
func (Github) ClosePullRequest ¶ added in v0.13.0
ClosePullRequest closes a pull request
func (Github) CreatePullRequest ¶
func (g Github) CreatePullRequest(ctx context.Context, repo domain.Repository, newPR domain.NewPullRequest) (domain.PullRequest, error)
CreatePullRequest creates a pull request
func (Github) GetPullRequestStatuses ¶
func (g Github) GetPullRequestStatuses(ctx context.Context, branchName string) ([]domain.PullRequest, error)
GetPullRequestStatuses gets the statuses of all pull requests of with a specific branch
func (Github) GetRepositories ¶
GetRepositories fetches repositories from all sources (orgs/user/specific repo)
func (Github) MergePullRequest ¶
MergePullRequest merges a pull request
type RepositoryListing ¶ added in v0.6.0
type RepositoryListing struct {
Organizations []string
Users []string
Repositories []RepositoryReference
}
RepositoryListing contains information about which repositories that should be fetched
type RepositoryReference ¶ added in v0.7.0
RepositoryReference contains information to be able to reference a repository
func ParseRepositoryReference ¶ added in v0.7.0
func ParseRepositoryReference(val string) (RepositoryReference, error)
ParseRepositoryReference parses a repository reference from the format "ownerName/repoName"
Click to show internal directories.
Click to hide internal directories.