Souvikns / Notion-Board

Sync GitHub issue to you notion database.
Apache License 2.0
22 stars 10 forks source link

Failed Workflow run with V2.1.0 #54

Closed DavidMc2021 closed 2 years ago

DavidMc2021 commented 2 years ago
image image

ERROR RequestError [HttpError]: Resource not accessible by integration at /home/runner/work/_actions/Souvikns/Notion-Board/2.1.0/dist/index.js:5319:21 at processTicksAndRejections (internal/process/task_queues.js:97:5) at async Object.next (/home/runner/work/_actions/Souvikns/Notion-Board/2.1.0/dist/index.js:3771:28) at async run (/home/ru

Souvikns commented 2 years ago

@DavidMc2021 are you running this workflow in a private repo?

Right now this action is making a call API call to the GitHub API to fetch all the issues in the repository, but I think it does not have the right permission to do so. https://github.com/Souvikns/Notion-Board/blob/46623541fe520f19ca7d58b231278b34daf9a553/src/index.ts#L21

I am using the token passed in the GITHUB_TOKEN field in the env. You can check if you are following this https://github.com/Souvikns/Notion-Board/blob/46623541fe520f19ca7d58b231278b34daf9a553/.github/workflows/notion.yml#L13-L16

Most probably you are using this in that case there is something else that is the matter.

Souvikns commented 2 years ago

@DavidMc2021 I found this https://docs.github.com/en/actions/security-guides/automatic-token-authentication maybe this is something you can use to resolve the Issue, I will be creating a new release soon currently trying to figure out why it is not working in your case.

Souvikns commented 2 years ago

@DavidMc2021 you can also check out - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

Maybe you can use this permission so that your GITHUB_TOKEN has the correct rights it need

DavidMc2021 commented 2 years ago

Yes this seems to be resolved now based on your suggestions and functioning. I changed the permissions and pointed it to V2.1.0 and now I am not seeing failures.

Souvikns commented 2 years ago

That is good to hear @DavidMc2021 you can also try using the latest version because v2.1.0 might not work if you have a lot of issues with the new version I added rate limit fallback so that only one request is called per second.