Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPipelineStatus ¶
func GetPipelineStatus(client *gitlab.Client, owner string, name string, opts *gitlab.ListProjectPipelinesOptions) (string, error)
GetPipelineStatus returns status of pipeline, if pipeline is absent, returns unknown string
Types ¶
type Input ¶
type Input struct {
// Repo is the git repo
Repo lib.Repo
// PlanDir is where the git repo that has been modified lives.
PlanDir string
// WorkDir is where the work associated with the Push operation happens
WorkDir string
// CommitMessage is the commit message for the PR
// Its first line is used as the PR title.
// Subsequent lines are used as the PR body if there is no body file.
CommitMessage string
// PRBody is the body of the PR submitted to Github
PRBody string
// PRAssignee is the user who will be assigned the PR
PRAssignee string
// BranchName is the branch name in Git
BranchName string
// Labels
Labels []string
// Draft controls whether it should be a draft PR
Draft bool
}
Input to Push()
type Output ¶
type Output struct {
Success bool
CommitSHA string
PullRequestURL string
PullRequestNumber int
PullRequestCombinedStatus string // failure, pending, or success
PullRequestAssignee string
CircleCIBuildURL string
}
Output from Push()
func GithubPush ¶
func GithubPush(ctx context.Context, input Input, repoLimiter *time.Ticker, pushLimiter *time.Ticker) (Output, error)
Push pushes the commit to Github and opens a pull request
Click to show internal directories.
Click to hide internal directories.