Versions in this module Expand all Collapse all v1 v1.1.0 Oct 25, 2026 v1.0.2 Oct 25, 2026 v1.0.1 Oct 25, 2026 Changes in this version + const AsyncMergeStatusEnqueued + const AsyncMergeStatusFailed + const AsyncMergeStatusMerged + const AsyncMergeStatusPending + const MergeActionDefault + const MergeActionDirectMerge + const MergeActionMergeQueue + const MergeMethodMerge + const MergeMethodRebase + const MergeMethodSquash + var ErrAsyncMergeUnavailable = errors.New("async stack merge is not available for this repository") + var Info = protocol.Info + func PRURL(host, owner, repo string, number int) string + func Plugin(opts api.ClientOptions) protocol.Plugin + func StackURL(host, owner, repo string, number int) string + type AsyncMergeDetails struct + ExpectedHeadSHA string + MergeAction string + MergeMethod string + Message string + SHA string + UUID string + type AsyncMergeResult struct + Details AsyncMergeDetails + Status string + func (r *AsyncMergeResult) IsEnqueued() bool + func (r *AsyncMergeResult) IsFailed() bool + func (r *AsyncMergeResult) IsMerged() bool + func (r *AsyncMergeResult) IsPending() bool + type AutoMergeRequest struct + EnabledAt string + type Client struct + func NewClient(host, owner, repo string) (*Client, error) + func (c *Client) AddToStack(stackNumber int, prNumbers []int) (*RemoteStack, error) + func (c *Client) BaseBranchUsesMergeQueue(baseRef string) (bool, error) + func (c *Client) CreatePR(base, head, title, body string, draft bool) (*PullRequest, error) + func (c *Client) CreateStack(prNumbers []int) (*RemoteStack, error) + func (c *Client) DisableAutoMerge(prID string) error + func (c *Client) FindPRByNumber(number int) (*PullRequest, error) + func (c *Client) FindPRDetailsForBranch(branch string) (*PRDetails, error) + func (c *Client) FindPRForBranch(branch string) (*PullRequest, error) + func (c *Client) FindStackForPR(prNumber int) (*RemoteStack, error) + func (c *Client) GetAsyncMergeResult(prNumber int, uuid string) (*AsyncMergeResult, error) + func (c *Client) GetStack(stackNumber int) (*RemoteStack, error) + func (c *Client) ListStacks() ([]RemoteStack, error) + func (c *Client) MarkPRReadyForReview(prID string) error + func (c *Client) MergeStackAsync(prNumber int, method, mergeAction string) (*AsyncMergeResult, error) + func (c *Client) PRTitles(numbers []int) (map[int]string, error) + func (c *Client) RepoMergeConfig() (*RepoMergeConfig, error) + func (c *Client) Unstack(stackNumber int) (rs *RemoteStack, dissolved bool, err error) + func (c *Client) UpdatePRBase(number int, base string) error + type MergeQueueEntry struct + ID string + type PRDetails struct + Body string + IsDraft bool + IsQueued bool + Merged bool + Number int + State string + Title string + URL string + type Provider struct + func (p *Provider) CancelAutoMerge(number int) error + func (p *Provider) CreateCR(n protocol.NewCR) (*protocol.CR, error) + func (p *Provider) FindCRForBranch(branch string) (*protocol.CR, error) + func (p *Provider) GetBranch(name string) (*protocol.Branch, error) + func (p *Provider) GetCR(number int) (*protocol.CR, error) + func (p *Provider) GetRepo() (*protocol.RepoSettings, error) + func (p *Provider) ListCRsTargeting(branch string) ([]*protocol.CR, error) + func (p *Provider) MarkReady(number int) (*protocol.CR, error) + func (p *Provider) Merge(number int, method, sha string) (*protocol.CR, error) + func (p *Provider) SearchCRs(text string) ([]*protocol.CR, error) + func (p *Provider) SyncStack(numbers []int) error + func (p *Provider) Unstack(numbers []int) error + func (p *Provider) UpdateCR(number int, u protocol.Update) (*protocol.CR, error) + type PullRequest struct + AutoMergeRequest *AutoMergeRequest + BaseRefName string + Body string + HeadRefName string + ID string + IsDraft bool + MergeQueueEntry *MergeQueueEntry + Merged bool + Number int + State string + Title string + URL string + func (pr *PullRequest) IsAutoMergeEnabled() bool + func (pr *PullRequest) IsQueued() bool + type RemoteStack struct + Base RemoteStackBase + CreatedAt string + ID int + NodeID string + Number int + Open bool + PRDetails []RemoteStackPR + PullRequests []int + URL string + func (s *RemoteStack) PRNumbers() []int + func (s *RemoteStack) UnmarshalJSON(data []byte) error + type RemoteStackBase struct + Ref string + Sha string + type RemoteStackPR struct + Draft bool + Head RemoteStackPRHead + MergedAt *string + Number int + State string + func (p RemoteStackPR) IsMerged() bool + type RemoteStackPRHead struct + Ref string + Sha string + type RepoMergeConfig struct + DefaultMethod string + MergeAllowed bool + RebaseAllowed bool + SquashAllowed bool + func (c RepoMergeConfig) AllowedMethods() []string + func (c RepoMergeConfig) Allows(method string) bool