-
-
Notifications
You must be signed in to change notification settings - Fork 457
Closed
Description
I have a workflow with corrent Github API token
But I got the fallback result:
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
I have tried that this token has all the permission github needed when creating a pull request PR:
name: Lint Other Language
on:
push:
branches:
- master
paths:
- "**.md"
- "**.yaml"
- "**.yml"
- "**.html"
- "**.json"
pull_request_target:
types: [opened, synchronize, reopened]
branches:
- master
- test
paths:
- "**.md"
- "**.yaml"
- "**.yml"
- "**.html"
- "**.json"
...
- name: try review api
run: |
curl -X POST \
-H "Authorization: token ${REVIEWDOG_GITHUB_API_TOKEN}" \
-H "Accept: application/vnd.github.v3+json" \
URL \
-d '{"body": "a review", "event": "COMMENT"}'
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.REVIEWDOG_TOKEN }}
- run: git diff --exit-code
- name: create review
if: ${{ failure() }}
run: |
TMPFILE=$(mktemp)
git diff >"${TMPFILE}"
git reset --hard HEAD
reviewdog -f=diff -f.diff.strip=1 -reporter=github-pr-review -tee < "${TMPFILE}"
exit 1
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.REVIEWDOG_TOKEN }}
Metadata
Metadata
Assignees
Labels
No labels