Skip to content

Commit e23d3c7

Browse files
authored
Add contents: write permission for preview of PR from ruby/rdoc (#1653)
For example, Dependabot uses this style. Currently, it's failing with "Resource not accessible by integration" error: https://github.com/ruby/rdoc/actions/runs/23154409178/job/67265027124?pr=1651#step:2:23 > RequestError [HttpError]: Resource not accessible by integration I haven't tested this but It seems `contents: write` is needed for repository dispatch: https://docs.github.com/en/rest/authentication/permissions-required-for-github-apps?apiVersion=2022-11-28#repository-permissions-for-contents > POST /repos/{owner}/{repo}/dispatches write
1 parent 697cb6e commit e23d3c7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/pr-preview-check.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
name: Trigger Preview Build and Deploy (Main Repo)
1010
runs-on: ubuntu-latest
1111
if: github.event.pull_request.head.repo.fork == false
12+
permissions:
13+
contents: write
1214
steps:
1315
- name: Trigger preview deployment
1416
uses: actions/github-script@v8

0 commit comments

Comments
 (0)