Repository navigation
fix(ci): make the pull-request title check actually check the title - #16
Merged
Merged
Conversation
NotThatKindOfDrLiz
requested review from
a team,
dcadenas and
rabble
and removed request for
a team
September 2, 2026 17:15
mbradley
approved these changes
Sep 2, 2026
mbradley
left a comment
Member
There was a problem hiding this comment.
Approving. I verified this is the identical one-line change across the fleet, and the diagnosis holds: on pull_request_target, the reusable workflow's if: github.event_name == 'pull_request' guard is false, so the title-check step is skipped while the job still reports green — the check never ran. Switching to pull_request satisfies that guard so the step runs, and it is the less-privileged trigger, which is the right choice for a title check that needs no secrets.
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.
Problem
This repo runs a
Semantic PRcheck, and a green tick beside it looks like proof the pull-request title was validated. It is proof of nothing. The check has never inspected a single title here.The reusable workflow we call guards its only step like this:
Our workflow triggers on
pull_request_target. Inside a reusable workflowgithub.event_nameis the caller's event, so that condition is false, GitHub skips the step, and the job still reports success — usually in about two seconds.You can see it on this repo's most recent run before this change:
56 of the 60 repos in the org with this workflow are in the same state.
AGENT_CONTEXT.mdalready warns about exactly this shape of bug — "a green check can belong to a job whoseif:skipped it" — and this is it, on nearly every pull request we open.The fix
Trigger on
pull_requestinstead ofpull_request_target. That satisfies the condition the reusable workflow is actually looking for, and it is what the four repos with a working check already do (divine-mobile,divine-invite-darshan,divine-pr-repair, anddivine-iac-coreconfigvia its own workflow).pull_requestis also the safer trigger for this job.pull_request_targetruns in the base repository's context with access to org secrets, which is why it exists for fork workflows that genuinely need them. A title check needs no secrets and no write access — onlypull-requests: read, which this workflow already declares.What to expect after merge
The check starts actually running. Any currently open pull request in this repo whose title is not a valid Conventional Commit will begin failing it. That is the check finally doing its job, but it will look sudden, so it is worth a glance at open PRs here after this merges.
Titles in this org already conform at a very high rate — all 300 of the most recent org pull requests parse cleanly — so the expected number of newly-failing PRs is low. It is just not zero.
How this was verified
Confirmed against the jobs API on
divine-contextandkeycast(step skipped, job green) and againstdivine-mobile, which triggers onpull_requestand genuinely runs the step. After merging, confirm the step rather than the job:gh api repos/{owner}/{repo}/actions/runs/<run-id>/jobs \ --jq '.jobs[].steps[] | "\(.conclusion) \(.name)"'A
skipped 🤖 Ensure Commit is Semanticline means it is still broken.Tracked in divinevideo/divine-context#106. Found while documenting title rules in divinevideo/divine-context#105.
🤖 Generated with Claude Code
https://claude.ai/code/session_01WYcWWWW9Hhr92Qtgz13Bvk