Repository navigation
ci: run the PR title check on pull_request - #150
Merged
Merged
Conversation
Since 3 December every pull_request_target run of this workflow fails at startup. The same file passes in private repos, and public repos that run the check on pull_request keep passing, so the trigger is what fails in a public repo. The check only reads the PR title, so it doesn't need pull_request_target's base-branch token.
doistbot
reviewed
Dec 4, 2026
doistbot
left a comment
Member
There was a problem hiding this comment.
This PR switches the semantic PR title check from pull_request_target to pull_request, making the workflow match the working setup in the org's other public repos. No inline issues were flagged — the change is a single-line trigger swap that only reduces privilege: the job reads the PR title only, checks out no PR code, and gets a read-only token under pull_request. Since pull_request runs the workflow file from the PR itself, this PR's own title check exercises the change, so a green run here is the verification.
I also left one optional follow-up note in the details below.
Optional follow-up note (1)
.github/workflows/check-semantic-pull-request.yml:4: Now that the workflow runs on
pull_request, add an explicit least-privilegepermissionsblock. Every otherpull_requestworkflow here (lint.yml,test.yml,check-skill-sync.yml) declares one, and without it this job inherits the repo's default token scope — write-capable for same-repo branches, when all the action needs is to read the title from the event payload.yaml on: pull_request: types: - edited - opened - synchronize permissions: contents: read
The action fetches the pull request to read its current title, so pull-requests: read is all it needs. Without a permissions block the job got the repository's default write token.
Contributor
|
🎉 This PR is included in version 6.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Since 3 December every run of this repo's PR title check has failed at startup ("This run likely failed because of a workflow file issue"). The same workflow file, byte for byte, keeps passing in the private repos that use it (aist-sdk-typescript, product-libraries-tokens), and the only
pull_request_targetworkflows in the org that fail this way are this one and its copies in the other two public repos (comms-cli, todoist-sdk-typescript, twist-cli). Public repos that run the check onpull_request(typist, react-compiler-tracker, todoist-mcp) kept passing on the same action version, so what fails ispull_request_targetin a public repo, not the action. Moving the action to Node 24 in #149 didn't change that.This runs the check on
pull_requestinstead, as typist and the org's other public repos do, and limits its token topull-requests: read, the only access it needs: the action fetches the pull request to read its current title. Without apermissionsblock the job got the repository's default write token.pull_requestruns the workflow file from the PR itself, so this PR's own title check exercises the change.