]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
build: Give auto review bot write permission on pull request
authorDaniel Wagner <dwagner@suse.de>
Mon, 4 Jul 2022 11:02:04 +0000 (13:02 +0200)
committerDaniel Wagner <dwagner@suse.de>
Mon, 4 Jul 2022 11:33:15 +0000 (13:33 +0200)
Currently setting the reviewer from the bot fails with:
  Error: HttpError: Resource not accessible by integration

The GITHUB_TOKEN needs enough permission to update the PR.

Links: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
Signed-off-by: Daniel Wagner <dwagner@suse.de>
.github/workflows/auto_request_review.yml

index fa3d2141904e048858ffaf1e433f33e2b4f979b4..6430f4cb15447dd8e4cf91443659a1546ae4c1c7 100644 (file)
@@ -1,3 +1,4 @@
+---
 name: Auto Request Review
 
 on:
@@ -8,9 +9,11 @@ jobs:
   auto-request-review:
     name: Auto Request Review
     runs-on: ubuntu-latest
+    permissions:
+      pull-requests: write
     steps:
       - name: Request review based on files changes and/or groups the author belongs to
         uses: necojackarc/auto-request-review@v0.7.0
         with:
           token: ${{ secrets.GITHUB_TOKEN }}
-          config: .github/reviewers.yml # Config file location override
+          config: .github/reviewers.yml  # Config file location override