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

example-04.yml workflow failed #8

Open
josecelano opened this issue May 2, 2022 · 0 comments
Open

example-04.yml workflow failed #8

josecelano opened this issue May 2, 2022 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@josecelano
Copy link
Member

The workflow failed:

https://github.com/Nautilus-Cyberneering/pygithub/runs/6231187549?check_suite_focus=true#step:4:18

It failed because we changed the default organization workflow permissions.

Run docker run --rm \
Traceback (most recent call last):
  File "/app/src/04_sign_commit_with_multiple_files_using_github_api.py", line [7](https://github.com/Nautilus-Cyberneering/pygithub/runs/6231187549?check_suite_focus=true#step:4:7)7, in <module>
    main(repo_token, branch)
  File "/app/src/04_sign_commit_with_multiple_files_using_github_api.py", line 34, in main
    blob1 = remote_repo.create_git_blob(file_to_update_01_content, "utf-[8](https://github.com/Nautilus-Cyberneering/pygithub/runs/6231187549?check_suite_focus=true#step:4:8)")
  File "/opt/venv/lib/python3.[9](https://github.com/Nautilus-Cyberneering/pygithub/runs/6231187549?check_suite_focus=true#step:4:9)/site-packages/github/Repository.py", line 908, in create_git_blob
    headers, data = self._requester.requestJsonAndCheck(
  File "/opt/venv/lib/python3.9/site-packages/github/Requester.py", line 353, in requestJsonAndCheck
    return self.__check(
  File "/opt/venv/lib/python3.9/site-packages/github/Requester.py", line 378, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 403 {"message": "Resource not accessible by integration", "documentation_url": "https://docs.github.com/rest/reference/git#create-a-blob"}
Error: Process completed with exit code 1.

We have to add the "contents: write" permission to the job.

Relates to nautilus-cyberneering/git-queue#147 (comment)

WE have to add this to the job:

runs-on: ubuntu-latest
permissions:
  issues: write
@josecelano josecelano added bug Something isn't working good first issue Good for newcomers labels May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant