From 175f9965563ad3011cb434b56ae05be45617bc1e Mon Sep 17 00:00:00 2001 From: Justin Merrell Date: Wed, 14 Oct 2026 02:55:16 +0000 Subject: [PATCH 1/2] ci(ci): lift the subject-length limit for Dependabot titles #49 assumed committed rejected Dependabot's capitalized "Bump". It doesn't: subject_capitalized = false only means a capital is not required. What committed actually rejects is length. A title such as "chore(deps): Bump ghcr.io/devcontainers/features/common-utils from 2.5.9 to 2.7.1" is 81 characters, and Dependabot cannot shorten it. For Dependabot alone, committed now runs against a copy of the config with subject_length = 0. The lowercasing #49 added did nothing, so it is removed. The Bump allowance in the subject pattern stays. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/validate-pull-request.yaml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/validate-pull-request.yaml b/.github/workflows/validate-pull-request.yaml index f1eef57..cb90c05 100644 --- a/.github/workflows/validate-pull-request.yaml +++ b/.github/workflows/validate-pull-request.yaml @@ -38,18 +38,22 @@ 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. + # Dependabot titles name the full package ("Bump ghcr.io/devcontainers/ + # features/common-utils from ... to ...") with no option to shorten them, + # so for Dependabot alone the subject-length limit is lifted; every other + # rule still applies. - name: Check the title passes committed env: TITLE: ${{ github.event.pull_request.title }} DEPENDABOT: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} run: | set -euo pipefail + config=.config/commits/committed.toml if [[ "$DEPENDABOT" == "true" ]]; then - TITLE="${TITLE/): Bump /): bump }" + sed 's/^subject_length = .*/subject_length = 0/' "$config" > "$RUNNER_TEMP/committed.toml" + config="$RUNNER_TEMP/committed.toml" fi - printf '%s\n' "$TITLE" | committed --config .config/commits/committed.toml --commit-file - + printf '%s\n' "$TITLE" | committed --config "$config" --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. @@ -74,7 +78,8 @@ jobs: types: ${{ steps.allowed.outputs.types }} scopes: ${{ steps.allowed.outputs.scopes }} requireScope: true - # Dependabot's "Bump" is the one capital allowed (see above). + # Dependabot capitalizes its fixed verb ("chore(deps): Bump ...") with + # no option to change it; that word is the one capital allowed. subjectPattern: >- ${{ github.event.pull_request.user.login == 'dependabot[bot]' && '^(?:[a-z]|Bump ).+$' || '^[a-z].+$' }} From aaa3fa39705794e483004cfa56cdf9318937c9db Mon Sep 17 00:00:00 2001 From: Justin Merrell Date: Wed, 14 Oct 2026 03:05:10 +0000 Subject: [PATCH 2/2] ci(ci): keep the literal committed command COMMIT-04 looks for Co-Authored-By: Claude Opus 5.5 --- .github/workflows/validate-pull-request.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validate-pull-request.yaml b/.github/workflows/validate-pull-request.yaml index cb90c05..b0e32f8 100644 --- a/.github/workflows/validate-pull-request.yaml +++ b/.github/workflows/validate-pull-request.yaml @@ -48,12 +48,13 @@ jobs: DEPENDABOT: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} run: | set -euo pipefail - config=.config/commits/committed.toml if [[ "$DEPENDABOT" == "true" ]]; then - sed 's/^subject_length = .*/subject_length = 0/' "$config" > "$RUNNER_TEMP/committed.toml" - config="$RUNNER_TEMP/committed.toml" + relaxed="$RUNNER_TEMP/committed.toml" + sed 's/^subject_length = .*/subject_length = 0/' .config/commits/committed.toml > "$relaxed" + printf '%s\n' "$TITLE" | committed --config "$relaxed" --commit-file - + else + printf '%s\n' "$TITLE" | committed --config .config/commits/committed.toml --commit-file - fi - printf '%s\n' "$TITLE" | committed --config "$config" --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.