Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Resource not accessible by integration #68

Closed
derl30n opened this issue Jun 14, 2021 · 16 comments
Closed

Error: Resource not accessible by integration #68

derl30n opened this issue Jun 14, 2021 · 16 comments

Comments

@derl30n
Copy link

derl30n commented Jun 14, 2021

For some reason I am unable to get this action to work.

My repo is public and not a fork.

I've also tested another action which did work but has very limited functionalities, this is why I'd like to use this action.

I also tried to include the new permission system to modify the default permissions.
I tried both as job and as workflow variable.
(https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions)

But generally it doesn't seem to be a permission issue tho when looking at the log
image

The project is called Backlog and the column Triage
image

At this point I am clueless and thats why I opened this issue :|

Also the Actions permissions
image

Also using a repository secret did not worked Bad credentials

This is the content of my yml. (it's the same as the one from your example)

name: Move new issues into Triage

on:
  issues:
    types: [opened]
    
jobs:
  automate-project-columns:
    runs-on: ubuntu-latest
    steps:
      - uses: alex-page/[email protected]
        with:
          project: Backlog
          column: Triage
          repo-token: ${{ secrets.GITHUB_TOKEN }}

Let me know if there is anything else you need.
Many thanks in advance!

@alex-page
Copy link
Owner

Can you share a link to your repo 👀

@derl30n
Copy link
Author

derl30n commented Jun 14, 2021

My test repo https://github.com/MisterChocker/test_repo

@alex-page
Copy link
Owner

Everything looks right to me 😬, I wonder if anyone else can see what is going wrong.

@derl30n
Copy link
Author

derl30n commented Jun 14, 2021

Yeah it does look right, it's really weird that it's not working.

@alex-page
Copy link
Owner

Can you try...

  1. Rename the project
  2. Update the workflow project name to match

Just to make sure this isn't a weird race condition? That is all I can think it could be 👻

@derl30n
Copy link
Author

derl30n commented Jun 14, 2021

I am in bed right now, but I can try it tomorrow.

But I've already created two more/different projects and they also did not work. (With the same error)

@derl30n
Copy link
Author

derl30n commented Jun 15, 2021

I've renamed the project and changed workflow project name to match.
Then I created a new issue to trigger the workflow.

image

name: Move new issues into Triage

on:
  issues:
    types: [opened]
    
jobs:
  automate-project-columns:
    runs-on: ubuntu-latest
    steps:
      - uses: alex-page/[email protected]
        with:
          project: TestProject
          column: Triage
          repo-token: ${{ secrets.GITHUB_TOKEN }}

Same result

image

@derl30n
Copy link
Author

derl30n commented Jun 15, 2021

Are you able to reproduce the issue on a new/different repo?

@Doarakko
Copy link
Contributor

I also reproduced with public repo and public project.

I solved it by creating and using a token with repo permission.

Related issue

repo is needed also for public user Projects and public repos
#51

@derl30n
Copy link
Author

derl30n commented Jun 26, 2021

@Doarakko thanks mate, I'll try with a token with repo permission later!

But these permissions make no sense ?!

@alex-page
Copy link
Owner

I have updated the documentation for repository projects. This is super odd though, thanks @MisterChocker and @Doarakko

@AllanChain
Copy link

I am new to this action and having the same problem. The GITHUB_TOKEN definitely has permission RepositoryProjects: write. If this action previously worked with GITHUB_TOKEN and recently fails, it might be GitHub's issue. (somewhat like actions/starter-workflows#332 ?) Should we contact GitHub if it is the case?

@nilsreichardt
Copy link

Any ideas why GITHUB_TOKEN is not working?

@nilsreichardt
Copy link

I created a public repository where I reproduced the issue: https://github.com/nilsreichardt/github-action-project-issue

Workflow:

name: new-issue-automation

on:
  issues:
    types: [opened]
    
jobs:
  move-new-issues-to-backlog:
    runs-on: ubuntu-latest
    steps:
      - uses: alex-page/[email protected]
        with:
          project: "Board"
          column: "Backlog"
          repo-token: ${{ secrets.GITHUB_TOKEN }}

The workflow failing with this error:

Error: Resource not accessible by integration

Link to broken workflow: https://github.com/nilsreichardt/github-action-project-issue/runs/3186029884?check_suite_focus=true

It's working with a personal access token, but with the GITHUB_TOKEN is not working. Therefore, I contacted the GitHub Support, why it's working with a personal access token, but not with the GITHUB_TOKEN (even when GITHUB_TOKEN has enough permissions).

I got this response from the GitHub Support:

Hi there,

Thank you for contacting GitHub Support.

I took a look at the workflow and was also able to reproduce it.

It doesn't look like an issue with GITHUB_TOKEN as I was able to use it on other third-party actions.

This looks like the issue is related to the action itself. The owners of the action could reach out to GitHub to investigate the issue with them.

I'm sorry I can't be of more help, do let us know if you need any further assistance.

Regards,

@alex-page, do you have the time to contact the support as the GitHub support mentioned, so we can find out, why personal access token is working, but GITHUB_TOKEN not? My support ticket id is 1253216.

@derl30n
Copy link
Author

derl30n commented Jul 30, 2021

It's still not working for me tho. Same issue as @nilsreichardt mentioned.

@kittykat
Copy link

Also still not working here when moving new issues to a workboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants