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

Caught error trying to update branch: Resource not accessible by integration #212

Closed
lucacome opened this issue Aug 19, 2021 · 5 comments · Fixed by #219
Closed

Caught error trying to update branch: Resource not accessible by integration #212

lucacome opened this issue Aug 19, 2021 · 5 comments · Fixed by #219

Comments

@lucacome
Copy link

Seems like autoupdate is not able to update PRs from a fork?
It fails to update all the PRs coming from forks, with: Caught error trying to update branch: Resource not accessible by integration

Here's the full log from one of the PRs

  Evaluating pull request #1883...
  Checking PR ready state
  PR_FILTER=all, checking if this PR's branch needs to be updated.
  All checks pass and PR branch is behind base branch.
  Updating branch 'opentracing-update' on pull request #1883 with changes from ref 'master'.
  Attempting branch update...
  Error: Caught error trying to update branch: Resource not accessible by integration
  Branch update failed, will retry in 300ms, retry #0 of 5.
@lucacome
Copy link
Author

Is there a way to at least exclude forks, so the workflow stops failing?

@chinthakagodawita
Copy link
Owner

Hey @lucacome - unfortunately this is expected as the Github token used by Actions won't have access to write to the fork (it's scoped to the repository that the Action runs on).

Good idea though, let me see if I can put something in to exclude forks.

@lucacome
Copy link
Author

Thanks, that would be useful!
In the meantime, I changed the token to use a PAT (so it could trigger other workflows) and I noticed that the error changed

  Updating branch 'opentracing-update' on pull request #1883 with changes from ref 'master'.
  Attempting branch update...
  Error: Caught error trying to update branch: Must have admin rights to Repository.

@chinthakagodawita
Copy link
Owner

Oh interesting I haven't see that happen before, what's your autoupdate config and what scopes does your PAT have access to?

@lucacome
Copy link
Author

I didn't create that PAT but I think it's just write permission, this is the workflow https://github.com/nginxinc/kubernetes-ingress/blob/master/.github/workflows/autoupdate-pr.yml

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

Successfully merging a pull request may close this issue.

2 participants