fix(commit-lint): gate on pull_request events only (same pattern as jira-ticket-check)#150
Merged
Merged
Conversation
…et-check) Follow-up to .github#144. That PR gated jira-ticket-check on pull_request events only; commit-lint has the same false-negative mode and needs the same fix. Symptom (from encodium/manage#29053841708, 2026-07-09): a squash-merge PR titled 'DEVEX-1653: thread on_rt input through deploy chain for Slack RT/Hotfix badge' lands on main. GitHub's default squash behavior uses the PR title as the commit subject. The org PR-title convention starts with a Jira ticket ID, not a conventional-commits type prefix, so commitlint's config-conventional rejects it on push:main. The shared ci-failure-notify chain (DEVEX-1398) posts a 'check failed on main' alert to #releases that looks like a build failure but is actually just this cosmetic re-check on a mechanically-generated subject. Fix: skip the check on push. The PR's original commits were already commit-linted at PR time — the re-run on main adds no new signal, only noise. If we ever want to enforce commitlint on the squash-merge subject too, the right move is to change the PR-title convention org-wide, not to keep re-running the check where it always fails. Verification plan: next squash-merge to any repo using this shared workflow. The commit-lint job should show as skipped (yellow) on push:main, not failed (red).
PR SummaryLow Risk Overview Squash-merge subjects use the org PR title ( Reviewed by Cursor Bugbot for commit 8f469ca. Bugbot is set up for automated code reviews on this repo. Configure here. |
pdodgen-revparts
marked this pull request as ready for review
July 9, 2026 22:49
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.
Symptom
encodium/manage run 29053841708 — squash-merge of encodium/manage#7671 (DEVEX-1653 on_rt sweep) landed on main. The Pull Request Workflow re-fired on
push:main, andcommit-lintcame back red:DEVEX-1653: thread on_rt input through deploy chain for Slack RT/Hotfix badge(taken from PR title per GitHub's default squash behavior)feat:,fix:,ci:, …)#releasesgot a "check failed on main" alert that looks like a build failure but is actually cosmeticEvery squash-merge from any repo using the org PR-title convention (
<TICKET-ID>: <terse description>) hits this. Manage is just the most visible because it merges frequently.Fix
Add
if: github.event_name == 'pull_request'to thecommitlintjob in the sharedgit-commit-lint.yaml. Same pattern I landed onjira-ticket-check.yamlin .github#144. On push:main the check skips (yellow), no false-negative fires.Why not enforce commitlint on the squash-merge subject
Two paths considered:
feat: DEVEX-1653 thread on_rt…). Breaks existing muscle memory + tooling, doesn't add value.Path 1 is cheaper and matches the pattern we established for jira-ticket-check.
Verification
Next squash-merge to any repo using this workflow. The
commit-lintjob should render as skipped (yellow) on push:main, not failed (red). PR-time commit-lint onpull_requestevents is unchanged.