refactor(commit-lint): use compare API and bump header to 100#26
Merged
Conversation
- Drop JS variant (unused, deprecated)
- Rename `commit-lint-shell.yaml` -> `commit-lint.yaml`
- Replace `actions/checkout` + `git log` with `gh api .../compare`
to avoid cloning entire history on large consumer repos
- Bump header max length 70 -> 100 (modern commitlint default;
matches Angular and accommodates Conventional Commits prefix)
- Unify renovate/extimage bot-bump skip across length and risk
checks (previously inconsistent: `bump` only for length,
`Update` only for risk)
- Pass GitHub context via `env:` instead of inline `${{ ... }}`
- Add `set -euo pipefail` so silent failures surface
- Replace `echo | awk` / `echo | cut` subshells with bash
parameter expansion
- Narrow permissions to `contents: read`
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dsecik
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Modernizes the commit-lint workflow with three main changes:
commit-lint.yaml(wagoid-based) hasn't received any updates in ~1 year; all activity has been on the shell variant. Both ran on every PR with the same name, doing duplicate work. The shell version is renamed back tocommit-lint.yaml.actions/checkout+git logwithgh api .../compare. The previous setup didfetch-depth: 100, which silently breaks on PRs with >100 commits or on merge_group events where the base diverged further back. Bumping tofetch-depth: 0would fix correctness but full-clone large consumer repos (gdc-nas, gooddata-ui-sdk, etc.) on every PR. The compare API returns exactly the commits we need with no checkout at all.Other audit fixes folded in
chore: bump, while the risk check skipped onlychore...: Update— inconsistent. Now both checks share one regex matchingchore(\(deps\))?: (Update|update|bump) ….env:instead of inline${{ … }}interpolation (actionlint hygiene; removes a script-injection foot-gun if reused with less-trusted fields).set -euo pipefailso silent failures (e.g., a malformedgit interpret-trailersinvocation) surface instead of producing empty trailers and passing.echo | awk/echo | cutsubshells with bash parameter expansion.contents: read(wascontents: read+pull-requests: read; the latter was for wagoid).set_commit_rangedropped; SHAs come from job-level env using the||fallback (works for bothpull_requestandmerge_group).Test plan
ghandjqare available oninfra1-runners-arcrunners (standard on GitHub-hosted; needs confirmation for ARC)pull_requestuse the head ref) — a green check here exercises the happy pathchore(deps): update …renovate-style commit (skip path)feat(scope): …commit between 70 and 100 chars (should now pass)🤖 Generated with Claude Code