agrc / create-reminder-action

A GitHub Action for setting reminders in issues
MIT License
11 stars 8 forks source link

"Resource not accessible by integration" error #176

Closed StilesCrisis closed 9 months ago

StilesCrisis commented 10 months ago

I'm new to Github Actions so this might be a simple issue, but I wasn't able to sort it out. I tried installing the /remind plugin to my repo and it is giving an error "Resource not accessible by integration". What does this mean? Thanks.

Run agrc/create-reminder-action@v1
  with:
    .....
  HttpError: Resource not accessible by integration
      at /home/runner/work/_actions/agrc/create-reminder-action/v1/webpack:/create-reminder-action/node_modules/@octokit/request/dist-node/index.js:86:1
      at processTicksAndRejections (node:internal/process/task_queues:96:[5](https://github.com/Ultrasquid9/this-is-a-terrible-idea/actions/runs/6037004425/job/16380424783#step:2:5))
      at run (/home/runner/work/_actions/agrc/create-reminder-action/v1/webpack:/create-reminder-action/index.js:[7](https://github.com/Ultrasquid9/this-is-a-terrible-idea/actions/runs/6037004425/job/16380424783#step:2:8)1:1)
StilesCrisis commented 10 months ago

I figured it out. The provided workflow yaml is missing any permissions. (from https://github.com/agrc/create-reminder-action#sample-usage )

https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/#setting-permissions-in-the-workflow

You need to include a permissions: block.

stdavis commented 10 months ago

Interesting. We haven't had to set any permissions for this workflow. Perhaps because we have different org-level setting than you do? This is what ours is set to: image

What permission(s) did you have to add to get it working? issues: write?

StilesCrisis commented 10 months ago

I didn't attempt to narrow it down in the least. This repo holds nothing secret. I just turned on anything that sounded remotely relevant.

permissions:
  actions: write
  checks: write
  contents: write
  issues: write
  pull-requests: write
  statuses: write
steveoh commented 10 months ago

We can add the tool that checks what is required for a run or two and update the docs. These are related to new GitHub security features.

steveoh commented 9 months ago

/remind me to look at the action run to see the required permissions tomorrow