Skip to content

fix(anti-abuse): draft PRs still burn CI minutes and skip the AI-review-skip default #6670

Description

@JSONbored

Draft PRs (opened as draft, or converted to draft after being opened) waste CI/review-pipeline resources in three concrete ways:

  1. .github/workflows/selfhost.yml's build-boot job (Postgres + 2 Docker builds, 20min timeout) has no draft guard, unlike ci.yml's heaviest jobs which already check github.event.pull_request.draft != true.
  2. .github/workflows/ui-preview.yml's build job (full UI build) has no draft guard either.
  3. Converting an already-open PR to draft (converted_to_draft) doesn't cancel any in-flight CI runs — nothing reacts to that webhook action today.
  4. The engine's own AI-review call (skip_drafts) is opt-in per repo; flipping the default to on (repos can still opt back in with an explicit skip_drafts: false) stops wasted AI-review spend on drafts fleet-wide.

Note: gate evaluation and check-run creation must keep running on draft PRs regardless of skip_drafts — that's a deliberate anti-gaming invariant (#3698, processors.ts's autoReviewSkipReason gating), not part of this fix's scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions