fork-sync icon indicating copy to clipboard operation
fork-sync copied to clipboard

Failed to create or merge pull request: HttpError: Resource not accessible by integration

Open NimaQu opened this issue 4 years ago • 6 comments

https://github.com/NimaQu/BiliExp/runs/2199469267

I've tried looking into it. When the pull request contains changes to the workflow file, the merge will be blocked( this post: https://github.community/t/github-action-resource-not-accessible-by-integration/16034/3), so maybe we need to use the personal access token to perform the merge?

NimaQu avatar Mar 26 '21 06:03 NimaQu

right, that should help

tgymnich avatar Mar 26 '21 09:03 tgymnich

Thanks for the reply, I made a patch and it works now: https://github.com/NimaQu/fork-sync/commit/9c28dd7cf88b901c0537ffc0b8e609ea7a8914d8

But there is a small problem, I did not configure autoApprove, but it still performs this function

https://github.com/NimaQu/BiliExp/pull/7

https://github.com/NimaQu/BiliExp/blob/master/.github/workflows/sync_fork.yml

I haven't used typescript, I just copied and modified it, can you help me to check where the error is?

NimaQu avatar Mar 26 '21 14:03 NimaQu

I don't know how this happened. But I tried to make personal access tokens work on this repo in version 1.4.

tgymnich avatar Mar 26 '21 14:03 tgymnich

Try adding follows into job lable? Maybe it works:

permissions:
      actions: write
      contents: write

This means add permissions for ${{ secret.GITHUB_TOKEN }}.

Curious-r avatar May 27 '22 16:05 Curious-r

There's also a configuration in settings/actions that you need to set to allow actions to create pull requests

emilgoldsmith avatar Apr 07 '23 12:04 emilgoldsmith

Might cause of security setting

image

Mine works fine

taozhiyu avatar Jul 31 '23 15:07 taozhiyu