diff --git a/.github/workflows/auto-rebase.yml b/.github/workflows/auto-rebase.yml index 86d208b4..6e74015b 100644 --- a/.github/workflows/auto-rebase.yml +++ b/.github/workflows/auto-rebase.yml @@ -6,9 +6,11 @@ # AGENTS — READ BEFORE EDITING: # • This file is a THIN CALLER STUB. All branch-update logic lives in the # reusable workflow above. -# • You MAY change: the SHA in the `uses:` line when upgrading the reusable -# workflow version (bump SHA to latest main of petry-projects/.github). -# • You MUST NOT change: trigger event, the concurrency group name, +# • You MUST NOT change: the `uses:` ref — it is pinned to the +# `auto-rebase/stable` channel, a moving tag advanced centrally. Never +# repoint it to `@main`, a SHA, or a frozen `@vX` (see ci-standards.md → +# Reusable workflow versioning). Also do not change the trigger event, +# the concurrency group name, # or the job-level `permissions:` block — reusable workflows can be # granted no more permissions than the calling job has, so removing # the stanza breaks the reusable's gh API calls. @@ -19,6 +21,16 @@ # Auto-rebase non-Dependabot PRs — thin caller for the org-level reusable. # To adopt: copy this file to .github/workflows/auto-rebase.yml in your repo. # No secrets required — uses GITHUB_TOKEN only. +# +# By default the reusable only updates *review-ready* PRs: non-draft AND +# (carrying a current APPROVED review OR the `auto-rebase:ready` label). This +# keeps the workflow from fanning out branch-update CI runs to every behind PR. +# To tune it, pass inputs to the reusable, e.g.: +# +# with: +# eligibility: review-ready # default; or `all` to update every behind PR +# ready_label: auto-rebase:ready # label that opts a non-draft PR in +# name: Auto-rebase non-Dependabot PRs on: @@ -36,7 +48,7 @@ permissions: {} jobs: auto-rebase: permissions: - contents: write # update-branch via GITHUB_TOKEN (may touch .github/workflows/) + contents: write # update-branch via GITHUB_TOKEN (may touch .github/workflows/) pull-requests: write # post comments on PRs - uses: petry-projects/.github/.github/workflows/auto-rebase-reusable.yml@376a4fcb1117444595e3e702fa450873d0e54310 # v2 + uses: petry-projects/.github/.github/workflows/auto-rebase-reusable.yml@auto-rebase/stable secrets: inherit