Skip to content

Commit

Permalink
Update backport workflow to use default GITHUB_TOKEN
Browse files Browse the repository at this point in the history
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 '<NODE ID>."`

Like in grafana/pyroscope#3557 (comment)

Behavior was documented in grafana/grafana-github-actions#226 and made configurable in 
grafana/grafana-github-actions#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.
  • Loading branch information
jdbaldry authored Sep 27, 2024
1 parent 8908735 commit 75fe764
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 75fe764

Please sign in to comment.