ci: gate PR edit automation by changed field (#95010)

* ci: gate PR edit automation by changed field

* ci: include title edits in ClawSweeper dispatch gate

* ci: refine PR edit automation gates

Co-authored-by: Sash Zats <sash@zats.io>

* test(ci): require boolean workflow matcher

Co-authored-by: Sash Zats <sash@zats.io>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
Sash Zats
2026-07-16 03:42:14 -04:00
committed by GitHub
parent 48b11d1c66
commit 0960d07d8e
5 changed files with 97 additions and 0 deletions
+14
View File
@@ -27,6 +27,15 @@ permissions: {}
jobs:
label:
if: >-
${{
github.event_name == 'pull_request_target' &&
(
github.event.action != 'edited' ||
github.event.changes.title ||
github.event.changes.base
)
}}
permissions:
contents: read
pull-requests: write
@@ -45,11 +54,13 @@ jobs:
app-id: "2971289"
private-key: ${{ secrets.GH_APP_PRIVATE_KEY_FALLBACK }}
- uses: actions/labeler@f27b608878404679385c85cfa523b85ccb86e213 # v6
if: ${{ github.event.action != 'edited' || github.event.changes.base }}
with:
configuration-path: .github/labeler.yml
repo-token: ${{ steps.app-token.outputs.token || steps.app-token-fallback.outputs.token }}
sync-labels: true
- name: Apply PR size label
if: ${{ github.event.action != 'edited' || github.event.changes.base }}
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
github-token: ${{ steps.app-token.outputs.token || steps.app-token-fallback.outputs.token }}
@@ -139,6 +150,7 @@ jobs:
labels: [targetSizeLabel],
});
- name: Apply maintainer or trusted-contributor label
if: ${{ github.event.action != 'edited' }}
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
github-token: ${{ steps.app-token.outputs.token || steps.app-token-fallback.outputs.token }}
@@ -210,6 +222,7 @@ jobs:
// });
// }
- name: Apply beta-blocker title label
if: ${{ github.event.action != 'edited' || github.event.changes.title }}
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
github-token: ${{ steps.app-token.outputs.token || steps.app-token-fallback.outputs.token }}
@@ -263,6 +276,7 @@ jobs:
});
}
- name: Apply too-many-prs label
if: ${{ github.event.action != 'edited' }}
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
github-token: ${{ steps.app-token.outputs.token || steps.app-token-fallback.outputs.token }}
@@ -16,6 +16,12 @@ permissions: {}
jobs:
real-behavior-proof:
name: Real behavior proof
if: >-
${{
github.event.action != 'edited' ||
github.event.changes.body ||
github.event.changes.base
}}
permissions:
contents: read
issues: read