srggrs / assign-one-project-github-action

Automatically add an issue or pull request to specific GitHub Project(s) when you create and/or label them.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resource not accessible by integration

ran-huang opened this issue · comments

commented

Hi there,

Got this message when running the job.
The same workflow runs okay in a personal repo, but not in an organization's repo, so I wonder if it's caused by issues of authorization?

{
  "message": "Resource not accessible by integration",
  "documentation_url": "https://developer.github.com/v3/projects/cards/#create-a-project-card"
}
commented

Fixed this.
The error occurred because I created a PR from fork. I need to create a PR directly from the upstream repo. Strange though.

commented

Yeah I think GitHub API does not support that just yet.... Did you create a token from the organisation repo?
Also can I close #48 or that's another issue

commented

Hi.
The "Resource not accessible by integration" error comes back again.
I notice that only Pull Requests created from the upstream repo can successfully trigger the action, and those created from fork get the "Resource not accessible by integration" error.

I didn't create a token, but just used an env GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} like you did in the examples. Is there anything wrong with this?

#48 is another issue. Thank you!

commented

I meant using a generate token in the case of this https://github.com/srggrs/assign-one-project-github-action#organisation-or-user-project. Perhaps because the "fork" belongs to another user and not to the original repo, you need a user generate token to "authorize" the action. Does it make sense?