From c5cc21a7cdf4a0f721cbce1fe663f226ce536771 Mon Sep 17 00:00:00 2001 From: Justin Merrell Date: Wed, 14 Oct 2026 02:32:01 +0000 Subject: [PATCH] ci: let Dependabot's capitalized Bump pass the title check Dependabot titles read "chore(deps): Bump ..." and it has no option to lowercase the verb, so every Dependabot PR failed both the committed step and action-semantic-pull-request's lowercase-subject pattern. For PRs Dependabot opens, the committed step lowercases that one word and the subject pattern also accepts a leading "Bump ". Every other title is held to the same rules as before. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/validate-pull-request.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate-pull-request.yaml b/.github/workflows/validate-pull-request.yaml index 2cca22f..f1eef57 100644 --- a/.github/workflows/validate-pull-request.yaml +++ b/.github/workflows/validate-pull-request.yaml @@ -38,10 +38,18 @@ jobs: # The rules the commit-msg hook applies, from the same file (COMMIT-04). # The title reaches committed on stdin from the environment, never # interpolated into the script, so it cannot inject into the shell. + # Dependabot capitalizes its fixed verb ("chore(deps): Bump ...") with no + # option to change it, so only that word is lowercased, only for it. - name: Check the title passes committed env: TITLE: ${{ github.event.pull_request.title }} - run: printf '%s\n' "$TITLE" | committed --config .config/commits/committed.toml --commit-file - + DEPENDABOT: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} + run: | + set -euo pipefail + if [[ "$DEPENDABOT" == "true" ]]; then + TITLE="${TITLE/): Bump /): bump }" + fi + printf '%s\n' "$TITLE" | committed --config .config/commits/committed.toml --commit-file - # committed cannot require a scope or a lowercase subject; the action # checks those, with the types and scopes read from the same file. @@ -66,4 +74,7 @@ jobs: types: ${{ steps.allowed.outputs.types }} scopes: ${{ steps.allowed.outputs.scopes }} requireScope: true - subjectPattern: ^[a-z].+$ + # Dependabot's "Bump" is the one capital allowed (see above). + subjectPattern: >- + ${{ github.event.pull_request.user.login == 'dependabot[bot]' + && '^(?:[a-z]|Bump ).+$' || '^[a-z].+$' }}