JuliaRegistries / TagBot

Creates tags, releases, and changelogs for your Julia packages when they're registered
https://github.com/marketplace/actions/julia-tagbot
MIT License
94 stars 20 forks source link

NameError: name 'repo' is not defined #255

Closed PharosAbad closed 1 year ago

PharosAbad commented 1 year ago
An unexpected, unreportable error occurred
Traceback (most recent call last):
  File "/root/tagbot/action/__main__.py", line 49, in <module>
    repo = Repo(
  File "/root/tagbot/action/repo.py", line 72, in __init__
    self._registry = self._gh.get_repo(registry)
  File "/usr/local/lib/python3.8/site-packages/github/MainClass.py", line 345, in get_repo
    headers, data = self.__requester.requestJsonAndCheck(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 315, in requestJsonAndCheck
    return self.__check(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 340, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.RateLimitExceededException: 403 {"message": "API rate limit exceeded for installation ID xxxxx.", "documentation_url": "https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/tagbot/action/__main__.py", line 97, in <module>
    repo.handle_error(e)
NameError: name 'repo' is not defined

by curl -i https://api.github.com/users/PharosAbad

x-ratelimit-limit: 60
x-ratelimit-remaining: 58
x-ratelimit-reset: 1674695501
x-ratelimit-used: 2

Which shows that "API rate limit exceeded" is not true, but the "NameError: name 'repo' is not defined" may be the real cause.

debug infomation

Run JuliaRegistries/TagBot@v1
  with:
    token: ***
    registry: JuliaRegistries/General
    github: github.com
    github_api: api.github.com
    branches: false
    dispatch: false
    dispatch_delay: 5
    lookback: 3
    draft: false
    user: github-actions[bot]
    email: 41898282+github-actions[bot]@users.noreply.github.com
    changelog: ## {{ package }} {{ version }}

  {% if previous_release %}
  [Diff since {{ previous_release }}]({{ compare_url }})
  {% endif %}

  {% if custom %}
  {{ custom }}
  {% endif %}

  {% if issues %}
  **Closed issues:**
  {% for issue in issues %}
  - {{ issue.title }} (#{{ issue.number }})
  {% endfor %}
  {% endif %}

  {% if pulls %}
  **Merged pull requests:**
  {% for pull in pulls %}
  - {{ pull.title }} (#{{ pull.number }}) (@{{ pull.author.username }})
  {% endfor %}
  {% endif %}
PharosAbad commented 1 year ago

works now. I think it is GitHub's server problem