Documentation
¶
Index ¶
Constants ¶
View Source
const ( CheckStatusUnknown checkStatus = iota CheckStatusPending CheckStatusPass CheckStatusFail )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHubInfo ¶
type GitHubInfo struct {
UserName string
RepositoryID string
LocalBranch string
PullRequests []*PullRequest
}
type GitHubInterface ¶
type GitHubInterface interface {
GetInfo(ctx context.Context, gitcmd git.GitInterface) *GitHubInfo
CreatePullRequest(ctx context.Context, info *GitHubInfo, commit git.Commit, prevCommit *git.Commit) *PullRequest
UpdatePullRequest(ctx context.Context, info *GitHubInfo, pr *PullRequest, commit git.Commit, prevCommit *git.Commit)
CommentPullRequest(ctx context.Context, pr *PullRequest, comment string)
MergePullRequest(ctx context.Context, pr *PullRequest)
ClosePullRequest(ctx context.Context, pr *PullRequest)
}
type PullRequest ¶
type PullRequest struct {
ID string
Number int
FromBranch string
ToBranch string
Commit git.Commit
Title string
MergeStatus PullRequestMergeStatus
Merged bool
}
func SortPullRequests ¶
func SortPullRequests(prs []*PullRequest, config *config.Config) []*PullRequest
SortPullRequests sorts the pull requests so that the one that is on top of
master will come first followed by the ones that are stacked on top.
The stack order is maintained so that multiple pull requests can be merged in
the correct order.
func (*PullRequest) StatusString ¶
func (pr *PullRequest) StatusString(config *config.Config) string
type PullRequestMergeStatus ¶
Click to show internal directories.
Click to hide internal directories.