From f71a5e123752ebf972dcef0cf6489be827d82f51 Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Mon, 25 Sep 2023 18:18:39 +0200 Subject: [PATCH] ci: Run ktlint workflow on forks, with write permissions (#95) Previously the permissions were only applied to branches from this repository, not forks. Use `pull_request_target` so the `GITHUB_TOKEN` will have the correct permissions when this workflow is run from a PR created from a clone. Remove the `issues` permission, it didn't seem necessary. --- .github/workflows/ktlint.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ktlint.yml b/.github/workflows/ktlint.yml index cdecb096a..c8e8591f4 100644 --- a/.github/workflows/ktlint.yml +++ b/.github/workflows/ktlint.yml @@ -1,9 +1,8 @@ name: reviewdog-suggester -on: pull_request +on: pull_request_target permissions: contents: read - issues: write pull-requests: write jobs: