Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Do ¶
Do executes the HTTP request and returns an error if the response status code is not successful.
func Register ¶
func Register(name string, factory ProviderFactory)
Register a new SCM provider factory by name.
Types ¶
type Provider ¶
type Provider interface {
// ListRepositories lists all repositories in the specified project.
ListRepositories() ([]*Repository, error)
// GetPullRequest retrieves a pull request by repository name and source branch.
GetPullRequest(repo, branch string) (*PullRequest, error)
// OpenPullRequest opens a new pull request in the specified repository.
OpenPullRequest(repo, branch, title, description string, reviewers []string) (*PullRequest, error)
// UpdatePullRequest updates an existing pull request.
UpdatePullRequest(repo, branch, title, description string, reviewers []string, appendReviewers bool) (*PullRequest, error)
// MergePullRequest merges an existing pull request.
MergePullRequest(repo, branch string) (*PullRequest, error)
}
Provider defines the interface for SCM providers.
type ProviderFactory ¶
type PullRequest ¶
Click to show internal directories.
Click to hide internal directories.