workflows/check: always run commits job

This is the very first step to extending the commits job to do more than
just cherry-picks in the future: It could check reverts or merge
commits, but also the commit message format and more.

Of course, cherry-picks are still just checked on the stable branches as
before. For now, this allows us to run the part that dismisses automated
reviews automatically. This helps us when we do branch related checks in
the prepare step, which would also create such a review. To avoid
cluttering multiple reviews across a PR, we'll want all of these reviews
to be handled by the same code, thus this change.

(cherry picked from commit b6bbf7b250)
This commit is contained in:
Wolfgang Walther
2025-08-21 15:08:23 +02:00
committed by github-actions[bot]
parent edde2afc1f
commit 59eb6387fa
3 changed files with 26 additions and 17 deletions

View File

@@ -45,10 +45,7 @@ jobs:
EOF
exit 1
cherry-pick:
if: |
github.event_name == 'pull_request' ||
(fromJSON(inputs.baseBranch).stable && !contains(fromJSON(inputs.headBranch).type, 'development'))
commits:
permissions:
pull-requests: write
runs-on: ubuntu-24.04-arm
@@ -68,16 +65,20 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: gh api /rate_limit | jq
- name: Check cherry-picks
- name: Check commits
id: check
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
env:
TARGETS_STABLE: ${{ fromJSON(inputs.baseBranch).stable && !contains(fromJSON(inputs.headBranch).type, 'development') }}
with:
script: |
const targetsStable = JSON.parse(process.env.TARGETS_STABLE)
require('./trusted/ci/github-script/commits.js')({
github,
context,
core,
dry: context.eventName == 'pull_request',
cherryPicks: context.eventName == 'pull_request' || targetsStable,
})
- name: Log current API rate limits