Versions in this module Expand all Collapse all v0 v0.17.15 May 11, 2026 v0.17.14 May 11, 2026 Changes in this version + const MaxGitHubConcurrency + const PRStateClosed + const PRStateMerged + const ReviewDecisionApproved + const ReviewDecisionChangesRequested + const ReviewDecisionReviewRequired + var ErrAutoMergeNotEnabled = errors.New("auto-merge is not enabled for this repository") + var ErrPRAlreadyMerged = errors.New("PR was merged while waiting") + var ErrPRCleanStatus = errors.New("PR is already in clean status") + func BatchGetPRChecksStatusGraphQL(ctx context.Context, runner git.Runner, owner, repo string, ...) (map[string]*CheckStatus, error) + func BatchGetPRMergeableStates(ctx context.Context, runner git.Runner, prNodeIDs []string) (map[string]*PRMergeableState, error) + func BatchGetPRTitlesGraphQL(ctx context.Context, runner git.Runner, owner, repo string, prNumbers []int) (map[int]string, error) + func CreatePullRequest(ctx context.Context, client *github.Client, owner, repo string, ...) (*github.PullRequest, error) + func DisableAutoMerge(ctx context.Context, runner git.Runner, prNodeID string) error + func EnableAutoMerge(ctx context.Context, runner git.Runner, prNodeID string, ...) error + func GetGitHubClient(ctx context.Context, runner git.Runner) (*github.Client, string, string, error) + func GetPullRequestByBranch(ctx context.Context, client *github.Client, owner, repo, branchName string) (*github.PullRequest, error) + func MergePullRequest(ctx context.Context, client *github.Client, owner, repo, branchName string, ...) error + func ParseReviewers(reviewersStr string) ([]string, []string) + func SyncPrInfo(ctx context.Context, runner git.Runner, branchNames []string, ...) error + func UpdatePullRequest(ctx context.Context, client *github.Client, runner git.Runner, ...) ([]string, error) + func WaitForPRMerge(ctx context.Context, runner git.Runner, prNodeID string, timeout time.Duration, ...) error + type AutoMergeStatus struct + Enabled bool + EnabledAt string + EnabledBy string + MergeMethod string + func GetAutoMergeStatus(ctx context.Context, runner git.Runner, prNodeID string) (*AutoMergeStatus, error) + type CheckDetail struct + Conclusion string + FinishedAt time.Time + Name string + StartedAt time.Time + Status string + type CheckStatus struct + Author string + Checks []CheckDetail + Passing bool + Pending bool + ReviewDecision string + State string + func (s *CheckStatus) HasFailingChecks() bool + func (s *CheckStatus) HasPendingChecks() bool + func (s *CheckStatus) IsApproved() bool + func (s *CheckStatus) IsReady() bool + type Client interface + BatchGetPRChecksStatus func(ctx context.Context, branchNames []string) (map[string]*CheckStatus, error) + BatchGetPRTitles func(ctx context.Context, owner, repo string, prNumbers []int) (map[int]string, error) + ClosePullRequest func(ctx context.Context, owner, repo string, prNumber int) error + CreatePRComment func(ctx context.Context, owner, repo string, prNumber int, body string) (int64, error) + CreatePullRequest func(ctx context.Context, owner, repo string, opts CreatePROptions) (*PullRequestInfo, error) + DeletePRComment func(ctx context.Context, owner, repo string, commentID int64) error + GetAllowedMergeMethods func(ctx context.Context) (*MergeMethodSettings, error) + GetCurrentUser func(ctx context.Context) (string, error) + GetOwnerRepo func() (owner, repo string) + GetPRChecksStatus func(ctx context.Context, branchName string) (*CheckStatus, error) + GetPullRequest func(ctx context.Context, owner, repo string, prNumber int) (*PullRequestInfo, error) + GetPullRequestByBranch func(ctx context.Context, owner, repo, branchName string) (*PullRequestInfo, error) + ListPRComments func(ctx context.Context, owner, repo string, prNumber int) ([]PRComment, error) + MergePullRequest func(ctx context.Context, branchName string, opts MergePROptions) error + UpdatePRComment func(ctx context.Context, owner, repo string, commentID int64, body string) error + UpdatePullRequest func(ctx context.Context, owner, repo string, prNumber int, opts UpdatePROptions) (warnings []string, err error) + type CreatePROptions struct + Assignees []string + Base string + Body string + Draft bool + Head string + Labels []string + Reviewers []string + TeamReviewers []string + Title string + type EnableAutoMergeOptions struct + CommitBody string + MergeMethod MergeMethod + type MergeMethod string + const MergeMethodMerge + const MergeMethodRebase + const MergeMethodSquash + type MergeMethodSettings struct + AllowMergeCommit bool + AllowRebaseMerge bool + AllowSquashMerge bool + type MergePROptions struct + CommitBody string + Method MergeMethod + type PRComment struct + Body string + ID int64 + type PRMergeableState struct + MergeStateText string + Mergeable bool + State string + func GetPRMergeableState(ctx context.Context, runner git.Runner, prNodeID string) (*PRMergeableState, error) + func WaitForMergeable(ctx context.Context, runner git.Runner, prNodeID string, timeout time.Duration, ...) (*PRMergeableState, error) + type PullRequestInfo struct + Base string + Body string + Draft bool + HTMLURL string + Head string + NodeID string + Number int + State string + Title string + Warnings []string + func ToPullRequestInfo(pr *github.PullRequest) *PullRequestInfo + type RepoInfo struct + Hostname string + Owner string + Repo string + func ParseGitHubRemoteURL(remoteURL string) (*RepoInfo, error) + type StackitGitHubClient struct + func NewGitHubClient(ctx context.Context, runner git.Runner) (*StackitGitHubClient, error) + func (c *StackitGitHubClient) BatchGetPRChecksStatus(ctx context.Context, branchNames []string) (map[string]*CheckStatus, error) + func (c *StackitGitHubClient) BatchGetPRTitles(ctx context.Context, owner, repo string, prNumbers []int) (map[int]string, error) + func (c *StackitGitHubClient) ClosePullRequest(ctx context.Context, owner, repo string, prNumber int) error + func (c *StackitGitHubClient) CreatePRComment(ctx context.Context, owner, repo string, prNumber int, body string) (int64, error) + func (c *StackitGitHubClient) CreatePullRequest(ctx context.Context, owner, repo string, opts CreatePROptions) (*PullRequestInfo, error) + func (c *StackitGitHubClient) DeletePRComment(ctx context.Context, owner, repo string, commentID int64) error + func (c *StackitGitHubClient) GetAllowedMergeMethods(ctx context.Context) (*MergeMethodSettings, error) + func (c *StackitGitHubClient) GetCurrentUser(ctx context.Context) (string, error) + func (c *StackitGitHubClient) GetOwnerRepo() (string, string) + func (c *StackitGitHubClient) GetPRChecksStatus(ctx context.Context, branchName string) (*CheckStatus, error) + func (c *StackitGitHubClient) GetPullRequest(ctx context.Context, owner, repo string, prNumber int) (*PullRequestInfo, error) + func (c *StackitGitHubClient) GetPullRequestByBranch(ctx context.Context, owner, repo, branchName string) (*PullRequestInfo, error) + func (c *StackitGitHubClient) ListPRComments(ctx context.Context, owner, repo string, prNumber int) ([]PRComment, error) + func (c *StackitGitHubClient) MergePullRequest(ctx context.Context, branchName string, opts MergePROptions) error + func (c *StackitGitHubClient) UpdatePRComment(ctx context.Context, owner, repo string, commentID int64, body string) error + func (c *StackitGitHubClient) UpdatePullRequest(ctx context.Context, owner, repo string, prNumber int, opts UpdatePROptions) ([]string, error) + type UpdatePROptions struct + Assignees []string + Base *string + Body *string + Draft *bool + Labels []string + MergeWhenReady *bool + RerequestReview bool + Reviewers []string + TeamReviewers []string + Title *string