Skip to content

Add contents: write permission for preview of PR from ruby/rdoc#1653

Merged
kou merged 1 commit intoruby:masterfrom
kou:ci-dependabot-preview
Mar 16, 2026
Merged

Add contents: write permission for preview of PR from ruby/rdoc#1653
kou merged 1 commit intoruby:masterfrom
kou:ci-dependabot-preview

Conversation

@kou
Copy link
Member

@kou kou commented Mar 16, 2026

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

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

```quote
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

```quote
POST /repos/{owner}/{repo}/dispatches	write
```
@kou kou requested a deployment to fork-preview-protection March 16, 2026 20:55 — with GitHub Actions Waiting
@kou
Copy link
Member Author

kou commented Mar 16, 2026

Let's try this with #1652 .

@kou kou merged commit e23d3c7 into ruby:master Mar 16, 2026
39 of 40 checks passed
@kou kou deleted the ci-dependabot-preview branch March 16, 2026 23:41
@kou
Copy link
Member Author

kou commented Mar 16, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants