github

package
v0.0.0-...-9fa5d6d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClaimIssue

func ClaimIssue(ctx context.Context, repo types.Repo, issueNumber int, agentName string) error

ClaimIssue sets the owner label on an issue (removes all other workflow/owner labels).

func ClaimPullRequest

func ClaimPullRequest(ctx context.Context, repo types.Repo, prNumber int, ownerLabel string) error

func DispatchTrustReason

func DispatchTrustReason(issue types.Issue) string

func GetAllOpenIssues

func GetAllOpenIssues(ctx context.Context) ([]types.Issue, error)

GetAllOpenIssues fetches open issues with workflow labels from all repos.

func GetIssueOwner

func GetIssueOwner(ctx context.Context, repo types.Repo, issueNumber int) (string, error)

GetIssueOwner returns the owner label (e.g. "claude-a") for an issue, or "" if unclaimed.

func GetNeedsReviewIssues

func GetNeedsReviewIssues(ctx context.Context) ([]types.Issue, error)

GetNeedsReviewIssues returns issues with the "needs-review" label. Used by the scheduler to intake review jobs for agent-assisted review.

func GetOpenPRNumber

func GetOpenPRNumber(ctx context.Context, repo types.Repo, issueNumber int) (int, error)

GetOpenPRNumber returns the PR number for an issue-N branch, or 0 if none.

func GetOpenPRs

func GetOpenPRs(ctx context.Context) ([]types.PullRequest, error)

func GetReadyIssues

func GetReadyIssues(ctx context.Context) ([]types.Issue, error)

GetReadyIssues returns issues with the "ready" label from configured repos. This is the only GitHub label the operator reads for dispatch decisions. After intake, all state is tracked in AgentJob CRDs.

func GetWorkflowIssues

func GetWorkflowIssues(ctx context.Context) ([]types.Issue, error)

func HasOpenPR

func HasOpenPR(ctx context.Context, repo types.Repo, issueNumber int) (bool, error)

HasOpenPR checks if there's an open PR for a given issue-N branch.

func IsDispatchTrustedIssue

func IsDispatchTrustedIssue(issue types.Issue) bool

func ParseBranchIssueNumber

func ParseBranchIssueNumber(branch string) int

func PostComment

func PostComment(ctx context.Context, repo types.Repo, issueNumber int, body string) error

PostComment posts a comment on a GitHub issue.

func SetIssueLabels

func SetIssueLabels(ctx context.Context, repo types.Repo, issueNumber int, addLabels []string, comment string) error

SetIssueLabels removes all workflow + owner labels, then adds exactly the given labels. This is the ONLY function that should modify workflow labels on issues.

func UnclaimIssue

func UnclaimIssue(ctx context.Context, repo types.Repo, issueNumber int, ownerLabel, returnLabel string) error

UnclaimIssue removes owner label and sets a workflow state label.

func UnclaimPullRequest

func UnclaimPullRequest(ctx context.Context, repo types.Repo, prNumber int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL