vsoch / pull-request-action

open a pull request when a branch is pushed or updated
https://github.com/marketplace/actions/pull-request-action
MIT License
173 stars 62 forks source link

The action fails to assign assignees to the created PR #105

Open HasanKhatib opened 3 months ago

HasanKhatib commented 3 months ago

Logs sample:

START: Running Pull Request on Branch Update Action!
Found ${GITHUB_EVENT_PATH} at /github/workflow/event.json
Branch prefix is 
No branch prefix is set, all branches will be used.
Pull requests will go to main
PULL_REQUEST_DRAFT set to a value: created PRs will be draft PRs.
No preference for maintainer being able to modify: default is true.
PULL_REQUEST_ASSIGNEES is set, HasanKhatib
.
.
github response: 'assignees_url': '[https://api.github.com/repos/ingka-group-digital/resolutions/assignees{/user}](https://api.github.com/repos/ingka-group-digital/resolutions/assignees%7B/user%7D)'

'assignee': None, 'assignees': []
.
.
Attempting to assign ['HasanKhatib'] to pull request with number 411
Error, but PASS_ON_ERROR is set, continuing: Unable to create assignees: 404: Not Found
 {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest/issues/assignees#add-assignees-to-an-issue', 'status': '404'}
github assignees response
  {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest/issues/assignees#add-assignees-to-an-issue', 'status': '404'}
vsoch commented 3 months ago

I don't see a repository under ingka-group-digital/resolutions. Is this regular GitHub (not enterprise) and you have write? I suspect there is a permissions / visibility issue somewhere.

HasanKhatib commented 3 months ago

ingka-group-digital is a private organisation on github. I will check our token permissions

vsoch commented 3 months ago

I would sanity check a similar run against a public repository. I'm guessing the 404 error is correct in that the token you have in the GitHub action runner cannot "see" the repository. The thing to try after that would be using a PAT instead.