Documentation
¶
Index ¶
- type BitbucketServer
- func (b *BitbucketServer) CreatePullRequest(repo *repository.Repository) (int, error)
- func (b *BitbucketServer) GetRepositories(vcsType repository.VCS) (repository.Repositories, error)
- func (b *BitbucketServer) MergePullRequest(repo *repository.Repository) error
- func (b *BitbucketServer) SCMType() repository.SCM
- type BitbucketServerConfig
- type PullRequestConfig
- type PullRequestStrategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitbucketServer ¶
type BitbucketServer struct {
// contains filtered or unexported fields
}
BitbucketServer scm.
func NewBitbucketServer ¶
func NewBitbucketServer(pullRequestConf PullRequestConfig, conf BitbucketServerConfig, cloneType string) *BitbucketServer
NewBitbucketServer initializes a new Bitbucket SCM manager.
func (*BitbucketServer) CreatePullRequest ¶
func (b *BitbucketServer) CreatePullRequest(repo *repository.Repository) (int, error)
CreatePullRequest against the repos provided using the strategy provided.
func (*BitbucketServer) GetRepositories ¶
func (b *BitbucketServer) GetRepositories(vcsType repository.VCS) (repository.Repositories, error)
GetRepositories that belong to the project.
func (*BitbucketServer) MergePullRequest ¶
func (b *BitbucketServer) MergePullRequest(repo *repository.Repository) error
MergePullRequest merges all existing pull requests that can be merged.
func (*BitbucketServer) SCMType ¶
func (b *BitbucketServer) SCMType() repository.SCM
SCMType returns the SCM type.
type BitbucketServerConfig ¶
type BitbucketServerConfig struct { URL string `yaml:"url"` Insecure bool `yaml:"insecure"` ProjectKey string `yaml:"project_key"` CloneType string `yaml:"clone_type"` Username string `yaml:"-"` Password string `yaml:"-"` Token string `yaml:"-"` }
BitbucketServerConfig is the information required to interact with Bitbucket server.
type PullRequestConfig ¶
type PullRequestConfig struct { Title string `yaml:"title"` Description string `yaml:"description"` AutoMerge bool `yaml:"auto_merge"` }
PullRequestConfig are the options to use for creating pull requests.
type PullRequestStrategy ¶
type PullRequestStrategy string
PullRequestStrategy is the strategy to use for creating pull requests. This allows you to not overwhelm you CI.
var ( // None strategy will create all pull requests at the sametime and is the default. None PullRequestStrategy = "none" // Batch strategy will create pull requests in batches. Batch PullRequestStrategy = "batch" )
Click to show internal directories.
Click to hide internal directories.