operation

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATUS_LABEL_PREFIX             string = "S-"
	LABEL_AWAITING_REVIEW           string = "S-awaiting-review"
	LABEL_AWAITING_MERGE            string = "S-awaiting-merge"
	LABEL_NEEDS_REBASE              string = "S-needs-rebase"
	LABEL_FAILS_TESTS_WITH_UPSTREAM string = "S-fails-tests-with-upstream"
	LABEL_DO_NOT_MERGE              string = "S-do-not-merge"
)

Variables

This section is empty.

Functions

func AddAwaitingMergeLabel

func AddAwaitingMergeLabel(list []*github.Label) []string

func AddAwaitingReviewLabel

func AddAwaitingReviewLabel(list []*github.Label) []string

func AddComment

func AddComment(ctx context.Context, issueSvc *github.IssuesService, owner string, name string, issue int, body string) bool

func AddFailsTestsWithUpsreamLabel

func AddFailsTestsWithUpsreamLabel(list []*github.Label) []string

func AddNeedRebaseLabel

func AddNeedRebaseLabel(list []*github.Label) []string

func CommentHeadIsDifferentFromAccepted

func CommentHeadIsDifferentFromAccepted(ctx context.Context, issueSvc *github.IssuesService, owner string, name string, prNum int)

func DeleteBranchByPullRequest

func DeleteBranchByPullRequest(ctx context.Context, svc *github.GitService, pr *github.PullRequest) (bool, error)

func GetLabelsByIssue

func GetLabelsByIssue(ctx context.Context, issueSvc *github.IssuesService, owner string, name string, issue int) []*github.Label

func HasLabelInList

func HasLabelInList(list []*github.Label, target string) bool

func IsIncludeAutoBranch

func IsIncludeAutoBranch(branches []*github.Branch, auto string) bool

func IsMergeable

func IsMergeable(ctx context.Context, prSvc *github.PullRequestsService, owner, name string, issue int, pr *github.PullRequest) (bool, bool)

func IsRelatedToMaster

func IsRelatedToMaster(pr *github.PullRequest, owner, master string) bool

func MergePullRequest

func MergePullRequest(ctx context.Context, client *github.Client, owner string, name string, info *github.PullRequest, acceptedSha string) bool

func RemoveStatusLabelFromList

func RemoveStatusLabelFromList(list []*github.Label) []string

func TryWithMaster

func TryWithMaster(ctx context.Context, client *github.Client, owner string, name string, info *github.PullRequest, autoBranch string) (bool, string)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL