Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTrustedAuthors = map[string]bool{ "renovate[bot]": true, "dependabot[bot]": true, }
Functions ¶
func DefaultSecurityCheckPatterns ¶
func DefaultSecurityCheckPatterns() []string
DefaultSecurityCheckPatterns returns a fresh copy of the built-in security-check pattern list. Returning a copy guarantees that callers cannot accidentally mutate the package-level default.
func FingerprintPR ¶
func FingerprintPR(ctx context.Context, client *github.Client, owner, repo string, pullReq *github.PullRequest) pr.Fingerprint
FingerprintPR computes the content fingerprint of a PR at its current head: the title-derived change ID always, plus the patch ID from the compare diff (base...head) when GitHub delivers it in full. Fetch errors and truncated diffs leave PatchID empty and never fail the caller -- a fingerprint is corroborating evidence, not a verdict, and pr.Fingerprint falls back to the change ID on its own.
Types ¶
type Processor ¶
type Processor struct {
Client *github.Client
DryRun bool
MergeAutoMerge bool
Login string
TrustedAuthors map[string]bool
// SecurityCheckPatterns is the list of case-insensitive substrings used
// to flag failing CI checks as security-related (e.g. govulncheck, Trivy,
// CodeQL). A nil slice falls back to DefaultSecurityCheckPatterns; a
// non-nil empty slice disables security classification entirely.
SecurityCheckPatterns []string
// MergeMaxRetries is the maximum number of merge attempts when the base
// branch is modified between fetch and merge. Zero uses the default (3).
MergeMaxRetries int
// MergeRetryWait is the base wait duration between merge retries.
// Zero uses the default (10s). Actual wait = base * attempt number.
MergeRetryWait time.Duration
// RefreshStale updates the branch of every stale PR from its base
// (see classifyStale) so CI re-runs against current code. Without it a
// stale PR is only reported as such. Ignored in dry-run mode.
RefreshStale bool
// CircleCI looks behind failing "ci/circleci: <job>" commit statuses to
// tell an auto-cancelled build from a real failure (see
// classifyCancelled). Nil disables the lookup and every CircleCI
// failure is taken at face value.
CircleCI *circleci.Client
// RetryCancelled retries every auto-cancelled CircleCI build that ran on
// a PR's current head so the same commit gets a real verdict. Without it
// a cancelled PR is only reported as such. Ignored in dry-run mode.
RetryCancelled bool
// contains filtered or unexported fields
}
func NewProcessor ¶
Click to show internal directories.
Click to hide internal directories.