From 72567aae9dcdab9b6cb654458a12b946a5e81e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gero=20Schw=C3=A4ricke?= Date: Mon, 18 Jul 2022 13:24:57 +0200 Subject: [PATCH] Add note on `GITHUB_TOKEN` usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This action needs access to the `GITHUB_TOKEN` if used with a private repository. Signed-off-by: Gero Schwäricke --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index d774b7a..c63bf12 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,25 @@ jobs: CHECKPATCH_COMMAND: ./devtools/checkpatches.sh ``` +**Note:** For **private repositories** this action needs access to the `GITHUB_TOKEN`. It needs read access to `contents` and `pull-requests` as minimum permissions. For example: +```yml +name: checkpatch review +on: [pull_request] +jobs: + my_review: + name: checkpatch review + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + steps: + - uses: actions/checkout@v1 + - name: Run checkpatch review + uses: webispy/checkpatch-action@master + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} +``` + ## References ### checkpatch tool