Versions in this module Expand all Collapse all v0 v0.2.0 Nov 13, 2026 Changes in this version + func CountRequests(ctx context.Context) (context.Context, func() int) + func PaceRequest(ctx context.Context) error + func WithRequestPacer(ctx context.Context, pace func(context.Context) error) context.Context + func WithRequestTimeout(ctx context.Context, d time.Duration) context.Context type RESTReader + func (r *RESTReader) Download(ctx context.Context, path string, w io.Writer) (int, error) v0.2.0-rc.3 Nov 13, 2026 v0.2.0-rc.2 Nov 12, 2026 v0.2.0-rc.1 Nov 11, 2026 v0.1.0 Nov 4, 2026 Changes in this version + const AdditionalViewerRepositories + const InitialViewerRepositories + const MaxAuthoredPullRequests + const MaxSearchQualifiers + const MaxThreadComments + const MergeBlocked + const MergeConflict + const MergeFailed + const MergeForbidden + const MergeHeadMoved + const MergeMethod + const MergeMethodMerge + const MergeMethodRebase + const MergeMethodSquash + const MergeNotOpen + const ReadThreadComments + const ReviewEventApprove + const ReviewEventComment + const ReviewEventRequestChanges + const ReviewFailed + const ReviewForbidden + const ReviewInvalidLine + const ReviewNotFound + const ReviewOwnPull + const SideLeft + const SideRight + const SourceChecks + const SourceComments + const SourceCommits + const SourcePullRequest + const SourceRequestedReviewers + const SourceRequiredChecks + const SourceReviewThreads + const SourceReviews + const UnavailableReviewComments + var ErrAmbiguousPullRequest = errors.New("the current branch has several open pull requests; pass --pr") + var ErrDetachedHead = errors.New(...) + var ErrHeadMoved = errors.New("the pull request's head changed while it was being read from GitHub") + var ErrIdentityChanged = errors.New("GitHub identity changed; retry the operation") + var ErrInvalidRepository = errors.New("--repo must be owner/name, or host/owner/name for another GitHub host") + var ErrNoPullRequest = errors.New("no pull request found for the current branch; pass --pr") + var ErrNoRemote = errors.New("this clone has no origin remote; pass --repo owner/name") + var ErrNotFound = errors.New("not found on GitHub") + var ErrNotGitHubRemote = errors.New("the remote does not name a repository on a GitHub host; pass --repo") + var ErrResponseTooLarge = errors.New("GitHub discovery response unreadable or too large") + var ErrUnknownHost = errors.New(...) + func IsGitHubHost(host string) bool + func RemoteNames(remote string, repo Repository) bool + func SetMaxPulls(n int) (restore func()) + type AuthoredPullRequest struct + ChecksFailing bool + Conflict bool + CreatedAt time.Time + Draft bool + FirstReviewAt *time.Time + MergedAt *time.Time + Number int + State string + type Client struct + func New(tokens TokenSource, opts Options) *Client + func NewFromConfig(cfg config.Config, opts Options) *Client + func (c *Client) AuthoredPullRequests(ctx context.Context, repository Repository, since time.Time) ([]AuthoredPullRequest, error) + func (c *Client) CurrentName(ctx context.Context, repo Repository) (string, error) + func (c *Client) Fetch(ctx context.Context, repo Repository, number int, opts FetchOptions) (Evidence, error) + func (c *Client) MergeOptions(ctx context.Context, repository Repository, number int) (MergeOptions, error) + func (c *Client) MergePullRequest(ctx context.Context, repository Repository, number int, ...) error + func (c *Client) REST(ctx context.Context, repository Repository) (*RESTReader, error) + func (c *Client) ReplyToThread(ctx context.Context, repository Repository, id, body string) error + func (c *Client) ResolvePR(ctx context.Context, clone Clone, opts ResolveOptions) (Target, error) + func (c *Client) ResolveThread(ctx context.Context, repository Repository, id string) error + func (c *Client) SearchRepositories(ctx context.Context, host, query string, scope SearchScope, cursor *string) (ViewerRepositoryList, error) + func (c *Client) SubmitReview(ctx context.Context, repository Repository, number int, ...) (ReviewResult, error) + func (c *Client) ThreadState(ctx context.Context, repository Repository, id string) (ThreadState, error) + func (c *Client) UnresolvedThreads(ctx context.Context, repository Repository, number int) (ReviewThreads, error) + func (c *Client) ViewerRepositories(ctx context.Context, host string, first int, cursor *string) (ViewerRepositoryList, error) + type Clone interface + BranchUpstream func(ctx context.Context, branch string) (remote, merge string, err error) + CurrentBranch func(ctx context.Context) (string, error) + RemoteFetchURL func(ctx context.Context, remote string) (string, error) + type Evidence struct + Checks []bundle.Check + Conversation []bundle.ConversationItem + Host string + Images []bundle.RenderedImage + PullRequest bundle.PullRequest + Repository string + Sources bundle.Sources + Threads []bundle.Thread + Unavailable map[string]error + func (e Evidence) Apply(b *bundle.Bundle) + type FetchOptions struct + BotReportMarkers []string + ChecksHead string + MetadataOnly bool + type ListedPull struct + Author string + BaseRef string + BaseSHA string + Body string + Bot bool + ClosedAt *time.Time + CreatedAt time.Time + CrossRepository bool + DefaultBranch string + Draft bool + HeadRef string + HeadSHA string + MergeCommitSHA string + MergedAt *time.Time + Number int + State string + Title string + UpdatedAt time.Time + type MergeError struct + Code string + Message string + func (e *MergeError) Error() string + type MergeOptions struct + Default string + Draft bool + HeadSHA string + MergeStateStatus string + Mergeable string + Methods []string + State string + type Options struct + AccountIdentity func(host, token string) string + AuthResult func(host, token string, status int, headers http.Header) + Transport http.RoundTripper + type PullList struct + Calls int + ETag string + NotModified bool + Pulls []ListedPull + Truncated bool + func ListPullRequests(ctx context.Context, reader Reader, repository Repository, etag string, ...) (PullList, error) + type RESTReader struct + func (r *RESTReader) CacheIdentity() string + func (r *RESTReader) GraphQL(ctx context.Context, query string, variables map[string]any) (int, http.Header, []byte, error) + func (r *RESTReader) Read(ctx context.Context, path, etag string) (int, http.Header, []byte, error) + func (r *RESTReader) Tail(ctx context.Context, path string, limit int) (int, []byte, error) + func (r *RESTReader) Write(ctx context.Context, method, path string, payload any) (int, []byte, error) + type RateLimitedError struct + Err error + ResumeAt time.Time + func (e *RateLimitedError) Error() string + func (e *RateLimitedError) Unwrap() error + type Reader interface + Read func(ctx context.Context, path, etag string) (int, http.Header, []byte, error) + type Repository struct + Host string + Name string + Owner string + func ParseRepository(value string) (Repository, error) + func RepositoryFromRemote(remote string) (Repository, error) + func (r Repository) String() string + type ResolveOptions struct + PR int + Repo string + type ReviewComment struct + Body string + Line int + Path string + Side string + StartLine int + StartSide string + type ReviewError struct + Code string + Message string + func (e *ReviewError) Error() string + type ReviewResult struct + URL string + type ReviewSubmission struct + Body string + Comments []ReviewComment + CommitID string + Event string + type ReviewThread struct + CanReply bool + CanResolve bool + Comments []ThreadComment + ID string + Line int + Outdated bool + Path string + Total int + URL string + type ReviewThreads struct + Capped bool + HeadSHA string + Unresolved []ReviewThread + ViewerDidAuthor bool + type SearchScope struct + Owners []string + Repositories []string + type Target struct + Number int + Repository Repository + type ThreadComment struct + Association string + Author string + Body string + Bot bool + URL string + type ThreadState struct + CanReply bool + CanResolve bool + Number int + Repository string + Resolved bool + type TokenSource func(ctx context.Context, host string) (string, error) + type ViewerRepository struct + Description string + Fork bool + Private bool + PushedAt time.Time + Repository string + type ViewerRepositoryList struct + NextCursor *string + Repositories []ViewerRepository + Scope SearchScope + TotalCount int v0.1.0-rc.2 Nov 3, 2026 v0.1.0-rc.1 Nov 3, 2026