Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
# decision, so the protected-path refusal and the size cap are lifted for the files the rule
# proved — and nothing else is. '[]' means no exception at all.
#
# AUTO_APPROVE_ENABLED set to "false" to stop it without editing this file
# AUTO_APPROVE_ENABLED set to "false" to stop it without editing this file — gates
# EVERY trigger (cron, check_suite, dispatch); a human overrides
# a stopped switch with the `force` dispatch input
name: auto-approve

on:
Expand All @@ -38,6 +40,11 @@ on:
types: [completed]
workflow_dispatch:
inputs:
force:
description: 'run even when AUTO_APPROVE_ENABLED=false (human override)'
required: false
type: boolean
default: false
pr:
description: 'PR number to evaluate (blank = every open PR)'
required: false
Expand All @@ -58,8 +65,15 @@ permissions:

jobs:
approve:
if: github.event_name != 'schedule' || vars.AUTO_APPROVE_ENABLED != 'false'
uses: lagowski/pr-review-gate/.github/workflows/fleet-auto-approve.yml@07aa324b002f9b9ff900130a11f5006c6536dec3
# Opt-OUT gating EVERY trigger. The old form (`event_name != 'schedule' || vars...`)
# short-circuited TRUE for check_suite and workflow_dispatch, so the flag was consulted
# only for the cron — and check_suite:completed is the PRIMARY path (the comments above
# call the sweep "the backstop, not the clock"). An operator hitting the documented
# emergency stop could not stop the two triggers that actually approve. Same defect
# copilot-comment-responder.yml already fixed: a kill switch that kills nothing.
# A human still overrides with `force`, so turning it off never blocks a person.
if: vars.AUTO_APPROVE_ENABLED != 'false' || github.event.inputs.force == 'true'
uses: lagowski/pr-review-gate/.github/workflows/fleet-auto-approve.yml@941c05bdc396111430091cee4fb465c911a0ac44
with:
runs_on: '["self-hosted","Linux","X64","build"]'
protected_paths: '[".github/workflows/",".github/CODEOWNERS",".github/review-context.md",".github/scripts/"]'
Expand All @@ -68,6 +82,10 @@ jobs:
# branch is a change to what may be merged unattended, and belongs in the reviewed
# registry rather than in a repo setting anyone with admin can flip.
base_branch: 'develop'
# Empty unless the repo runs sprint branches (veracrew#408). A PR into a matching
# branch is auto-approvable on the SAME terms as one into the trunk; the sprint ->
# trunk PR is not, because its base is the trunk.
sprint_base_pattern: ''
# Rendered from `auto_approve_mechanical`; '[]' — no exception — is the default everywhere.
mechanical_rules: '["canon_sync"]'
max_changed_lines: ${{ vars.AUTO_APPROVE_MAX_LINES || '400' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-comment-responder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
# that kills nothing. A human overrides with the `force` input, so turning it off still
# never blocks a person.
if: vars.RESPONDER_SCHEDULE_ENABLED != 'false' || github.event.inputs.force == 'true'
uses: lagowski/pr-review-gate/.github/workflows/fleet-copilot-comment-responder.yml@07aa324b002f9b9ff900130a11f5006c6536dec3
uses: lagowski/pr-review-gate/.github/workflows/fleet-copilot-comment-responder.yml@941c05bdc396111430091cee4fb465c911a0ac44
with:
runs_on: '["self-hosted","claude-bridge"]'
pr: ${{ github.event.inputs.pr || '' }}
Expand Down