nodiscc / hecat

Generic automation tool around data stored as plaintext YAML files
GNU General Public License v3.0
29 stars 5 forks source link

processors/github_metadata: handle github.GithubException.GithubException (403/Repository access blocked) #79

Closed nodiscc closed 1 year ago

nodiscc commented 1 year ago

https://github.com/nodiscc/hecat/actions/runs/4077918296/jobs/7027511851

...
INFO:github_metadata.py: Missing metadata for Horahora, gathering it from Github API
Traceback (most recent call last):
  File "/home/runner/work/hecat/hecat/.venv/bin/hecat", line 33, in <module>
    sys.exit(load_entry_point('hecat==0.0.1', 'console_scripts', 'hecat')())
  File "/home/runner/work/hecat/hecat/.venv/lib/python3.10/site-packages/hecat-0.0.1-py3.10.egg/hecat/main.py", line 25, in main
  File "/home/runner/work/hecat/hecat/.venv/lib/python3.10/site-packages/hecat-0.0.1-py3.10.egg/hecat/processors/github_metadata.py", line 80, in add_github_metadata
  File "/home/runner/work/hecat/hecat/.venv/lib/python3.10/site-packages/hecat-0.0.1-py3.10.egg/hecat/processors/github_metadata.py", line 48, in get_gh_metadata
  File "/home/runner/work/hecat/hecat/.venv/lib/python3.10/site-packages/PyGithub-1.57-py3.10.egg/github/MainClass.py", line 330, in get_repo
    headers, data = self.__requester.requestJsonAndCheck("GET", url)
  File "/home/runner/work/hecat/hecat/.venv/lib/python3.10/site-packages/PyGithub-1.57-py3.10.egg/github/Requester.py", line 353, in requestJsonAndCheck
    return self.__check(
  File "/home/runner/work/hecat/hecat/.venv/lib/python3.10/site-packages/PyGithub-1.57-py3.10.egg/github/Requester.py", line 378, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 403 {"message": "Repository access blocked", "block": {"reason": "private_information", "created_at": "2023-02-02T16:19:49Z", "html_url": "https://github.com/tos"}}

https://github.com/horahoradev/horahora

image