Skip to content

chore(ci): fail PR CI on breaking-change commit markers - #388

Open
jwulf with Copilot wants to merge 4 commits into
mainfrom
copilot/add-breaking-change-detection
Open

chore(ci): fail PR CI on breaking-change commit markers#388
jwulf with Copilot wants to merge 4 commits into
mainfrom
copilot/add-breaking-change-detection

Conversation

Copilot AI commented May 16, 2026

Copy link
Copy Markdown
Contributor

This PR adds an explicit PR-time guard against unintended major semantic-release bumps. It detects breaking-change commit markers on incoming PR branches so maintainers can rewrite commit history before merging to main.

  • What changed

    • Added a new PR-only job in .github/workflows/test.yml: breaking-change-commit-check.
    • The job scans commits in ${base}..${head} and fails when it finds:
      • Conventional Commit bang syntax in subject (type!: / type(scope)!:)
      • BREAKING CHANGE: / BREAKING CHANGES: footer markers in commit body
    • On failure, it prints offending commit SHAs/subjects and a clear remediation message (rewrite PR history).
  • Docs update

    • Updated RELEASE.md to document that PR CI now blocks breaking-change markers to prevent accidental major bumps from feature-branch-only commits.
  • Workflow snippet

    - name: Detect breaking-change commit markers
      run: |
        commits="$(git rev-list --reverse "${BASE_SHA}..${HEAD_SHA}")"
        # fail if subject matches type!:/type(scope)!:
        # or body contains BREAKING CHANGE(S):

Copilot AI linked an issue May 16, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add breaking change commit detection to PR CI chore(ci): fail PR CI on breaking-change commit markers May 16, 2026
Copilot finished work on behalf of jwulf May 16, 2026 22:53
Copilot AI requested a review from jwulf May 16, 2026 22:53
@jwulf
jwulf marked this pull request as ready for review May 29, 2026 05:01
Copilot AI review requested due to automatic review settings May 29, 2026 05:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a PR-only CI guard that fails when any PR commit carries Conventional Commit breaking-change markers (type!: / type(scope)!: subjects or BREAKING CHANGE(S): footers), preventing accidental major semantic-release bumps. Also documents this guard in RELEASE.md.

Changes:

  • New breaking-change-commit-check job in .github/workflows/test.yml that walks ${BASE_SHA}..${HEAD_SHA} and reports offending commits with a remediation message.
  • RELEASE.md note explaining that PR CI now blocks breaking-change markers so authors can rewrite history before merging.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/test.yml Adds the PR-only breaking-change commit scan job (uses actions/checkout@v6 with full history, bash regex over each commit's subject/body, fails with offending SHAs).
RELEASE.md Adds one-line documentation of the new PR CI breaking-change marker check.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add breaking change commit detection to PR CI

3 participants