mikepenz/release-changelog-builder-action

Workflow not finishing: Resource not accessible by integration

devmaxde opened this issue · 3 comments

Hey,
I always get the following Error :(
Error: Resource not accessible by integration
Any Idea why this is happening?

Here is the full log.

log.txt

I am using the following configuration: (txt because of upload. It was a yml)

release.txt

Maybe some more context. I am using this workflow in a private Organisation repository. I censored the Name of the organization and the repo in the logs. That's why you'll only see organization/private-repo as the git url

@mibkvr it seems based on the log:

2023-09-03T20:58:24.6596756Z ℹ️ Fetching PRs between dates 2023-09-03T20:55:27.000Z to 2023-09-03T20:55:27.000Z for organisation/private-reop
2023-09-03T20:58:24.8901416Z ##[error]Resource not accessible by integration

That this does occur right when we try to fetch the PRs. So this would indicate that the provided token GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} does not have read access to PULL_REQUESTS. (https://github.com/mikepenz/release-changelog-builder-action?tab=readme-ov-file#token-permission)

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs#defining-access-for-the-github_token-scopes

Yeah.
The Permissions were missing. Maybe add them to the example.
`
permissions:

contents: write

discussions: write

pull-requests: read`

Thx @mikepenz