fix(jira-ticket-check): skip on non-pull_request events#144
Merged
Conversation
Squash-merge commit messages on main often don't carry the Jira ticket ID — semantic-conventional commits like 'refactor(ci): …' are common and legitimate. Consumer workflows that reuse jira-ticket-check on both pull_request and push:main triggers were hitting false negatives because push-time squash commits don't match the check's regex. Gate the job on github.event_name == 'pull_request'. The PR-time check already validated the ticket before the merge landed; running again on push is redundant. Surfaced from encodium/manage's Pull Request Workflow reporting failure on the post-DEVEX-1653 dispatch-refactor merge (2026-07-08). Refs DEVEX-1653.
PR SummaryLow Risk Overview That avoids false failures after squash merges, where the commit message often lacks a Jira key even though the PR already passed the check. Pull request runs are unchanged. Reviewed by Cursor Bugbot for commit dc045e1. Bugbot is set up for automated code reviews on this repo. Configure here. |
pdodgen-revparts
marked this pull request as ready for review
July 8, 2026 20:34
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
Adds
if: github.event_name == 'pull_request'to thecheck-jira-ticketjob so it doesn't fire on push events.Problem
Consumer repos (e.g., encodium/manage's Pull Request Workflow) reuse this shared workflow on both
pull_requestandpush: maintriggers to share lint/test jobs. On push:main, the squash-merge commit message often doesn't carry the Jira ticket ID — semantic-conventional commits likerefactor(ci): …are common and legitimate — so the check produces false-negative alerts.Reference failing run: manage#28971802686 — merge of today's dispatch refactor PR failed the Jira check even though the PR itself was properly linked.
Fix
Skip the check on non-pull_request events. Reasoning:
Blast radius
Zero on the PR path — pull_request events still run the check exactly as before. Only reduces the false-negative rate on push:main.
Related