From 75fe7645b40f4bf91b0f5717bf7056168b72f457 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Fri, 27 Sep 2024 19:29:15 +0100 Subject: [PATCH] Update backport workflow to use default GITHUB_TOKEN Use the default token injected into workflows since the GH_BOT_ACCESS_TOKEN is revoked. The default token doesn't have the permission used for unassigning default reviewers. If you don't have it, you get cryptic comments posted back on the PR after the backport PRs are opened with the message `Validation Failed: "Could not resolve to a node with the global id of '."` Like in https://github.com/grafana/pyroscope/pull/3557#issuecomment-2348613956 Behavior was documented in https://github.com/grafana/grafana-github-actions/pull/226 and made configurable in https://github.com/grafana/grafana-github-actions/pull/227 `removeDefaultReviewers: false` instructs the workflow to not try to avoid the error but will of course not remove the default reviewers assigned on the backport PR. --- .github/workflows/backport.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index fbf9ddd1f127..00550afc7a0e 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -14,14 +14,13 @@ jobs: with: repository: "grafana/grafana-github-actions" path: ./actions - # Pin the version to before https://github.com/grafana/grafana-github-actions/pull/113 because - # to avoid the strict rules for PR labels. - ref: d284afd314ca3625c23595e9f62b52d215ead7ce - name: Install Actions run: npm install --production --prefix ./actions - name: Run backport uses: ./actions/backport with: - token: ${{secrets.GH_BOT_ACCESS_TOKEN}} - labelsToAdd: "backport" + labelsToAdd: backport + # The provided token needs read permissions for organization members if you want to remove the default reviewers. + removeDefaultReviewers: false title: "[{{base}}] {{originalTitle}}" + token: ${{ secrets.GITHUB_TOKEN }}