Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { Details string // contains filtered or unexported fields }
Error and details from Push()
type Input ¶
type Input struct { // Repo is the git Repo Repo lib.Repo // PRNumber of Github, e.g. for https://github.com/Clever/microplane/pull/123, the PRNumber is 123 PRNumber int // CommitSHA for the commit which opened the above PR. Used to look up Commit status. CommitSHA string // RequireReviewApproval specifies if the PR must be approved before merging // - must have at least 1 reviewer // - all reviewers must have explicitly approved RequireReviewApproval bool // RequireBuildSuccess specifies if the PR must have a successful build before merging RequireBuildSuccess bool // Merge method to use. Possible values include: "merge", "squash", and "rebase" MergeMethod string }
Input to Push()
type Output ¶
Output from Push()
func GitHubMerge ¶
func GitHubMerge(ctx context.Context, input Input, repoLimiter *time.Ticker, mergeLimiter *time.Ticker) (Output, error)
Merge an open PR in Github - repoLimiter rate limits the # of calls to Github - mergeLimiter rate limits # of merges, to prevent load when submitting builds to CI system
func GitlabMerge ¶
func GitlabMerge(ctx context.Context, input Input, repoLimiter *time.Ticker, mergeLimiter *time.Ticker) (Output, error)
Merge an open MR in Gitlab - repoLimiter rate limits the # of calls to Github - mergeLimiter rate limits # of merges, to prevent load when submitting builds to CI system
Click to show internal directories.
Click to hide internal directories.