Skip to content

ci(ci): skip commits already on develop when linting release PRs - #199

Merged
MarTrepodi merged 1 commit into
developfrom
ci/commitlint-skip-develop-commits
Oct 22, 2026
Merged

MarTrepodi merged 1 commit into
developfrom
ci/commitlint-skip-develop-commits

Conversation

@MarTrepodi

Copy link
Copy Markdown
Collaborator

Summary

The v2.6.0 release PR (#198) fails the required Validate Commit Messages check on 8 Dependabot commits (build(deps…): Bump …, subject-case). Those commits are exempt only on PRs Dependabot opened, so they passed on their way into develop. A release PR re-introduces them under a maintainer's account, and they get linted again.

On PRs into main, commits already on develop are now excluded, as commits already on main already were:

 git fetch origin main develop
-commits = rev-list base..head --no-merges --not main
+landed = [main]
+if base.ref == main:
+  landed += [develop]        # each one passed this check landing on develop
+commits = rev-list base..head --no-merges --not landed

develop requires the same check, so a commit reachable from it has already been linted or legitimately exempted. The Dependabot-PR path uses the same landed list.

Evidence

I ran the workflow's own Validate commits script locally against #198's real base and head:

  • Before (equivalent to base.ref=develop, which matches CI): 32 commits linted, 8 Dependabot failures, exit 1.
    After (base.ref=main): only 8155a04 chore(changelog): update for v2.6.0 is linted. It passes, exit 0.

Merge Danger

Door: two-way. One workflow file and no data; revert to restore.

Blast Radius: narrow. Only PRs into main, and there only commits already on develop, which have already passed the same required check.

Related Issues

Unblocks #198.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactor (code change that neither fixes a bug nor adds a feature)
  • Performance improvement
  • Documentation
  • Tests
  • CI / build / dependencies

Checklist

  • This PR targets the develop branch (only release PRs target main)
  • My commits follow the Conventional Commits / Angular convention (feat:, fix:, refactor:, etc.) — they become the changelog
  • I have not edited CHANGELOG.md by hand (it is generated from commit messages)
  • I have added/updated docstrings with type hints for any new or changed public methods
  • I have updated the docs (README.md, docs/, examples/) if user-facing behavior changed
  • I have added unit tests that cover my changes (mocked, not requiring a live comlink service)
  • Tests pass (uv run pytest tests/)
  • Ruff linter and formatter pass (uv run ruff check src/ tests/ and uv run ruff format --check src/ tests/)
  • Type check passes (uv run ty check src/swgoh_comlink/)
  • I have not bundled unrelated changes in this PR

🤖 Generated with Claude Code

A release PR into main carries every develop commit, and Commit Lint
re-checked all of them. Dependabot's "Bump ..." subjects fail
subject-case and are only exempt on PRs Dependabot opened, so the
v2.6.0 release PR failed the required check on eight commits that had
already passed it on their way into develop.

On PRs into main, also exclude commits reachable from develop, which
requires the same check. PRs into develop lint exactly as before. The
fetch now names its refspecs with "+" so it updates refs that
actions/checkout already created instead of relying on FETCH_HEAD.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the ci Changes related to continuous integration processes label Oct 22, 2026
@MarTrepodi
MarTrepodi merged commit f406128 into develop Oct 22, 2026
16 checks passed
@MarTrepodi
MarTrepodi deleted the ci/commitlint-skip-develop-commits branch October 22, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Changes related to continuous integration processes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant