From 8815b38c884787320cafbc07a37b462865ffa7e4 Mon Sep 17 00:00:00 2001 From: Ethan <39577870+ethanndickson@users.noreply.github.com> Date: Mon, 3 Feb 2025 20:49:37 +1100 Subject: [PATCH] ci!: set pr write perms on `release-labels` (#16380) I'm pretty sure this is the fix, but I can't test it without merging it, as `pull_request_target` causes the workflow to run using the workflow on `main` (where the permissions aren't set). This comment would seem to indicate that `pull_request_target` with PR write perms does the trick: https://github.com/actions/labeler/issues/136#issuecomment-1357839196 From what I can tell this job has been broken since ~nov '24, which leads me to believe it was the permissions change made that month: https://github.com/coder/coder/actions/runs/11915659159/job/33206435274 --- .github/workflows/contrib.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/contrib.yaml b/.github/workflows/contrib.yaml index a1a6e91f04..48d93b31fd 100644 --- a/.github/workflows/contrib.yaml +++ b/.github/workflows/contrib.yaml @@ -46,6 +46,8 @@ jobs: release-labels: runs-on: ubuntu-latest + permissions: + pull-requests: write # Skip tagging for draft PRs. if: ${{ github.event_name == 'pull_request_target' && !github.event.pull_request.draft }} steps: