Versions in this module Expand all Collapse all v1 v1.0.0 Feb 17, 2026 Changes in this version + type Client struct + func NewClient(cfg ClientConfig) *Client + func (c *Client) AddLabel(ctx context.Context, repo Repository, number int, label string) error + func (c *Client) AddLabelToPRsBatched(ctx context.Context, repo Repository, prNumbers []int, label string) error + func (c *Client) GetFile(ctx context.Context, repo Repository, path string, ref string) (*File, error) + func (c *Client) GetPR(ctx context.Context, repo Repository, number int) (*PullRequest, error) + func (c *Client) GetPRFiles(ctx context.Context, repo Repository, number int) ([]File, error) + func (c *Client) ListFiles(ctx context.Context, repo Repository, path string, ref string) ([]string, error) + func (c *Client) ListPRFiles(ctx context.Context, repo Repository, number int) ([]PRFile, error) + func (c *Client) ListPRs(ctx context.Context, repo Repository) ([]PullRequest, error) + func (c *Client) ListReviews(ctx context.Context, repo Repository, number int) ([]Review, error) + func (c *Client) ListStatuses(ctx context.Context, repo Repository, ref string) ([]Status, error) + func (c *Client) MergePR(ctx context.Context, repo Repository, number int, commitMsg string) error + func (c *Client) RemoveLabel(ctx context.Context, repo Repository, number int, label string) error + func (c *Client) RemoveLabelFromPRsBatched(ctx context.Context, repo Repository, prNumbers []int, label string) error + func (c *Client) RemoveLabelsWithPrefixBatched(ctx context.Context, repo Repository, prNumbers []int, prefix string, ...) error + type ClientConfig struct + BaseURL string + HTTPClient *httpclient.Client + Logger Logger + type File struct + Content string + Path string + type InstrumentedClient struct + func NewInstrumentedClient(client *Client, metrics *observability.ComponentMetrics) *InstrumentedClient + func (ic *InstrumentedClient) AddLabel(ctx context.Context, repo Repository, number int, label string) error + func (ic *InstrumentedClient) AddLabelToPRsBatched(ctx context.Context, repo Repository, prNumbers []int, label string) error + func (ic *InstrumentedClient) GetFile(ctx context.Context, repo Repository, path string, ref string) (*File, error) + func (ic *InstrumentedClient) GetPR(ctx context.Context, repo Repository, number int) (*PullRequest, error) + func (ic *InstrumentedClient) GetPRFiles(ctx context.Context, repo Repository, number int) ([]File, error) + func (ic *InstrumentedClient) ListFiles(ctx context.Context, repo Repository, path string, ref string) ([]string, error) + func (ic *InstrumentedClient) ListPRFiles(ctx context.Context, repo Repository, number int) ([]PRFile, error) + func (ic *InstrumentedClient) ListPRs(ctx context.Context, repo Repository) ([]PullRequest, error) + func (ic *InstrumentedClient) ListReviews(ctx context.Context, repo Repository, number int) ([]Review, error) + func (ic *InstrumentedClient) ListStatuses(ctx context.Context, repo Repository, ref string) ([]Status, error) + func (ic *InstrumentedClient) MergePR(ctx context.Context, repo Repository, number int, commitMsg string) error + func (ic *InstrumentedClient) RemoveLabel(ctx context.Context, repo Repository, number int, label string) error + func (ic *InstrumentedClient) RemoveLabelFromPRsBatched(ctx context.Context, repo Repository, prNumbers []int, label string) error + func (ic *InstrumentedClient) RemoveLabelsWithPrefixBatched(ctx context.Context, repo Repository, prNumbers []int, prefix string, ...) error + type Label struct + Color string + Name string + type Logger interface + Debug func(msg string, fields ...zap.Field) + Error func(msg string, fields ...zap.Field) + Info func(msg string, fields ...zap.Field) + Warn func(msg string, fields ...zap.Field) + type MockClient struct + AddLabelFunc func(ctx context.Context, repo Repository, number int, label string) error + GetPRFilesFunc func(ctx context.Context, repo Repository, number int) ([]File, error) + GetPRFunc func(ctx context.Context, repo Repository, number int) (*PullRequest, error) + ListPRsFunc func(ctx context.Context, repo Repository) ([]PullRequest, error) + MergePRFunc func(ctx context.Context, repo Repository, number int, commitMsg string) error + RemoveLabelFunc func(ctx context.Context, repo Repository, number int, label string) error + func NewMockClient(log Logger) *MockClient + func (m *MockClient) AddLabel(ctx context.Context, repo Repository, number int, label string) error + func (m *MockClient) GetPR(ctx context.Context, repo Repository, number int) (*PullRequest, error) + func (m *MockClient) GetPRFiles(ctx context.Context, repo Repository, number int) ([]File, error) + func (m *MockClient) ListPRs(ctx context.Context, repo Repository) ([]PullRequest, error) + func (m *MockClient) MergePR(ctx context.Context, repo Repository, number int, commitMsg string) error + func (m *MockClient) RemoveLabel(ctx context.Context, repo Repository, number int, label string) error + type PRFile struct + Additions int + Changes int + Deletions int + Filename string + Patch string + Size int64 + Status string + type PullRequest struct + BaseBranch string + CreatedAt time.Time + HeadSHA string + ID int64 + Labels []Label + Mergeable *bool + MergeableState string + Number int + Owner string + Repo string + State PullRequestState + Title string + UpdatedAt time.Time + type PullRequestState string + const PullRequestStateClosed + const PullRequestStateMerged + const PullRequestStateOpen + type PullRequestWebhookPayload struct + Action string + PullRequest PullRequest + Repository Repository + type Repository struct + Name string + Owner string + type Review struct + Body string + ID int64 + State string + SubmittedAt time.Time + User string + type Status struct + Context string + CreatedAt time.Time + Description string + State string + TargetURL string + UpdatedAt time.Time + type WebhookEvent struct + DeliveryID string + Payload interface{} + Type string + func ParseWebhook(req *http.Request, secret string) (*WebhookEvent, error) v0 v0.1.0 Mar 1, 2026