From e2e61f78eca947d0871f6aebf55ae061e8284f55 Mon Sep 17 00:00:00 2001 From: Scott Lovegrove Date: Fri, 4 Dec 2026 15:44:49 +0000 Subject: [PATCH 1/2] ci: run the PR title check on pull_request 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. --- .github/workflows/check-semantic-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-semantic-pull-request.yml b/.github/workflows/check-semantic-pull-request.yml index ab970d0..1a077af 100644 --- a/.github/workflows/check-semantic-pull-request.yml +++ b/.github/workflows/check-semantic-pull-request.yml @@ -1,7 +1,7 @@ name: Semantic Pull Request on: - pull_request_target: + pull_request: types: - edited - opened From 25e8a98574307ceb925287cef4e3099706c54e68 Mon Sep 17 00:00:00 2001 From: Scott Lovegrove Date: Fri, 4 Dec 2026 15:47:41 +0000 Subject: [PATCH 2/2] ci: limit the title check's token to reading pull requests 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. --- .github/workflows/check-semantic-pull-request.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/check-semantic-pull-request.yml b/.github/workflows/check-semantic-pull-request.yml index 1a077af..9324c01 100644 --- a/.github/workflows/check-semantic-pull-request.yml +++ b/.github/workflows/check-semantic-pull-request.yml @@ -7,6 +7,9 @@ on: - opened - synchronize +permissions: + pull-requests: read + jobs: validate-title: name: Validate Title