From 1d8d8ecb6f4ce8ca8bf4fceea84140e09eaba21f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Houpert?= <10154151+lhoupert@users.noreply.github.com> Date: Thu, 12 Nov 2026 09:49:02 +0000 Subject: [PATCH 1/2] ci: run the PR title check on pull_request GitHub blocks pull_request_target in public repositories by default from 2 December 2026, which would leave the required validate-pr-title check pending. The title comes from the event and the label is added with the workflow token, so the app token step is dropped. --- .github/workflows/actions.lock | 6 ------ .github/workflows/conventional-commits.yml | 17 ++++++++--------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock index 3295b17..1f78b81 100644 --- a/.github/workflows/actions.lock +++ b/.github/workflows/actions.lock @@ -4,7 +4,6 @@ version: 'v0.0.3' workflows: '.github/workflows/conventional-commits.yml': - - 'actions/create-github-app-token@v3.3.0' - 'ytanikin/pr-conventional-commits@1.5.2' '.github/workflows/deploy-mkdocs.yml': - 'actions/checkout@v7.0.1' @@ -27,11 +26,6 @@ dependencies: commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1' owner_id: 44036562 repo_id: 197814629 - 'actions/create-github-app-token@v3.3.0': - ref: 'v3.3.0' - commit: 'sha1-64ab729a6294000f5aa4a4bc0b73d1f32bc45510' - owner_id: 44036562 - repo_id: 642580244 'actions/download-artifact@v8.0.2': ref: 'v8.0.2' commit: 'sha1-9000827ccba6bdab643e8b6fd33ac0654aef8333' diff --git a/.github/workflows/conventional-commits.yml b/.github/workflows/conventional-commits.yml index 2366263..486fc8e 100644 --- a/.github/workflows/conventional-commits.yml +++ b/.github/workflows/conventional-commits.yml @@ -1,22 +1,21 @@ name: PR Conventional Commit Validation on: - pull_request_target: + pull_request: types: [opened, synchronize, reopened, edited] +permissions: {} + jobs: validate-pr-title: runs-on: ubuntu-latest + permissions: + pull-requests: write # add the type label + issues: write # create a missing type label steps: - - uses: actions/create-github-app-token@v3.3.0 - id: app-token - with: - client-id: ${{ secrets.DS_RELEASE_BOT_ID }} - private-key: ${{ secrets.DS_RELEASE_BOT_PRIVATE_KEY }} - permission-pull-requests: write - - name: PR Conventional Commit Validation uses: ytanikin/pr-conventional-commits@1.5.2 with: task_types: '["feat","fix","docs","test","ci","refactor","perf","chore","revert"]' - token: ${{ steps.app-token.outputs.token }} + # Fork PRs get a read-only token, so labeling would fail the check. + add_label: ${{ github.event.pull_request.head.repo.full_name == github.repository }} From 1eb8dde17fd1dcedf7b365cabda0745c3839cb49 Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Thu, 12 Nov 2026 15:52:21 -0500 Subject: [PATCH 2/2] ci: drop issues: write from the PR title check Creating and adding labels accepts either the Issues or the Pull requests write permission, so pull-requests: write alone is enough. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/conventional-commits.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/conventional-commits.yml b/.github/workflows/conventional-commits.yml index 486fc8e..03cdaeb 100644 --- a/.github/workflows/conventional-commits.yml +++ b/.github/workflows/conventional-commits.yml @@ -10,8 +10,7 @@ jobs: validate-pr-title: runs-on: ubuntu-latest permissions: - pull-requests: write # add the type label - issues: write # create a missing type label + pull-requests: write # add the type label, creating it if missing steps: - name: PR Conventional Commit Validation uses: ytanikin/pr-conventional-commits@1.5.2