From 97387ab1e77f688bdb9374d10ca77b4ccd7c908d Mon Sep 17 00:00:00 2001 From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com> Date: Fri, 30 May 2025 13:47:27 +0000 Subject: [PATCH 1/4] chore: modify `_update-self-references` workflow to use a PAT --- .github/workflows/_update-self-references.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/_update-self-references.yml b/.github/workflows/_update-self-references.yml index 91f090d..83b557c 100644 --- a/.github/workflows/_update-self-references.yml +++ b/.github/workflows/_update-self-references.yml @@ -1,3 +1,7 @@ +# This workflow uses a Personal Access Token instead of built-in GITHUB_TOKEN to create the pull request +# This is necessary because it commits changes to workflow files, which is not allowed with the default GITHUB_TOKEN. +# See example https://github.com/peter-evans/create-pull-request/issues/3558 + name: Update Self-References on: @@ -36,6 +40,7 @@ jobs: - name: Create Pull Request uses: peter-evans/create-pull-request@v7 with: + token: ${{ secrets.EXERCISE_TOOLKIT_TOKEN }} commit-message: "chore: update exercise-toolkit self-references to latest commit" title: "chore: update exercise-toolkit self-references to latest commit" body: | From bf08a5d58f3da0a46beab1eba3920876b1bab19d Mon Sep 17 00:00:00 2001 From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com> Date: Fri, 30 May 2025 13:50:54 +0000 Subject: [PATCH 2/4] Review cannot be requested from pull request author. (pat) --- .github/workflows/_update-self-references.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/_update-self-references.yml b/.github/workflows/_update-self-references.yml index 83b557c..108ce3b 100644 --- a/.github/workflows/_update-self-references.yml +++ b/.github/workflows/_update-self-references.yml @@ -55,8 +55,6 @@ jobs: add-paths: | .github/workflows/*.yml draft: false - reviewers: | - FidelusAleksander labels: | skip-release-notes maintenance From 088eff0a6c242c782b4cddf3777e3d6a753ae741 Mon Sep 17 00:00:00 2001 From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com> Date: Fri, 30 May 2025 13:54:21 +0000 Subject: [PATCH 3/4] Remove maintenance label --- .github/workflows/_update-self-references.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/_update-self-references.yml b/.github/workflows/_update-self-references.yml index 108ce3b..3abd0f1 100644 --- a/.github/workflows/_update-self-references.yml +++ b/.github/workflows/_update-self-references.yml @@ -57,4 +57,3 @@ jobs: draft: false labels: | skip-release-notes - maintenance From 728db8026958fa75fc64e5ee20f5791d882eee18 Mon Sep 17 00:00:00 2001 From: Aleksander Fidelus <63016446+FidelusAleksander@users.noreply.github.com> Date: Fri, 30 May 2025 14:00:47 +0000 Subject: [PATCH 4/4] Add note about PAT permissions --- .github/workflows/_update-self-references.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/_update-self-references.yml b/.github/workflows/_update-self-references.yml index 3abd0f1..4a44ef0 100644 --- a/.github/workflows/_update-self-references.yml +++ b/.github/workflows/_update-self-references.yml @@ -1,6 +1,7 @@ # This workflow uses a Personal Access Token instead of built-in GITHUB_TOKEN to create the pull request # This is necessary because it commits changes to workflow files, which is not allowed with the default GITHUB_TOKEN. # See example https://github.com/peter-evans/create-pull-request/issues/3558 +# The PAT needs to have `contents: write` `pull-requests: write` and `workflows: write` permissions. name: Update Self-References