Skip to content

fix(jira-ticket-check): skip on non-pull_request events#144

Merged
pdodgen-revparts merged 1 commit into
mainfrom
DEVEX-jira-check-pr-only
Jul 8, 2026
Merged

fix(jira-ticket-check): skip on non-pull_request events#144
pdodgen-revparts merged 1 commit into
mainfrom
DEVEX-jira-check-pr-only

Conversation

@pdodgen-revparts

Copy link
Copy Markdown
Contributor

Summary

Adds if: github.event_name == 'pull_request' to the check-jira-ticket job 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_request and push: main triggers to share lint/test jobs. On push:main, the squash-merge commit message often doesn't carry the Jira ticket ID — semantic-conventional commits like refactor(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:

  • The PR-time check already validated the ticket before the merge landed.
  • Running again on the resulting main push is redundant.
  • Squash-merge commit format is orthogonal to whether the branch's PR had a valid ticket link.

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

  • DEVEX-1653 (RT v2 — pattern of shared workflows called from multi-trigger repo pipelines)

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.
@cursor

cursor Bot commented Jul 8, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Single workflow guard with no change to PR validation behavior; only skips redundant runs on push events.

Overview
Adds if: github.event_name == 'pull_request' on the check-jira-ticket job so the shared workflow no longer runs when callers invoke it from push (e.g. push to main alongside pull_request).

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
pdodgen-revparts marked this pull request as ready for review July 8, 2026 20:34
@pdodgen-revparts
pdodgen-revparts requested a review from a team as a code owner July 8, 2026 20:34
@pdodgen-revparts
pdodgen-revparts merged commit 590e3ab into main Jul 8, 2026
2 checks passed
@pdodgen-revparts
pdodgen-revparts deleted the DEVEX-jira-check-pr-only branch July 8, 2026 20:34
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.

1 participant