Move reviewdog-suggester permissions block to before the job definition

The reviewdog-suggester job was failing to leave comments, reporting:

```
reviewdog: This GitHub token doesn't have write permission of Review API [1], 
so reviewdog will report results via logging command [2] and create annotations similar to
github-pr-check reporter as a fallback.
```

Despite a `permissions` block the log showed the permissions as:

```
GITHUB_TOKEN Permissions
  Contents: read
  Issues: read
  Metadata: read
  PullRequests: read
```

Move the `permissions` block to earlier in the file, in case the position is important.
This commit is contained in:
Nik Clayton 2023-08-25 12:53:18 +02:00 committed by GitHub
parent 5764efa5d4
commit 2cc8414e9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,11 @@
name: reviewdog-suggester name: reviewdog-suggester
on: pull_request on: pull_request
permissions:
contents: read
issues: write
pull-requests: write
jobs: jobs:
ktlint: ktlint:
timeout-minutes: 5 timeout-minutes: 5
@ -29,7 +35,4 @@ jobs:
with: with:
tool_name: ktlintFormat tool_name: ktlintFormat
permissions:
contents: read
issues: write
pull-requests: write