BobAnkh / auto-generate-changelog

A Github Action to generate CHANGELOG automatically according to conventional commits. Feel free to contribute!
Apache License 2.0
80 stars 22 forks source link

How to overcome "API rate limit exceeded for installation" error? #119

Closed nicrie closed 8 months ago

nicrie commented 8 months ago

Thank you for this great bot! I'd really like to see it in action in this repository.

However, I was surprised to encounter two problems:

  1. Although a new release was made, the Bot was not automatically triggered. I had to add a workflow dispatch to start it manually. What do I have to change in the configuration to make it run automatically after each new release?
  2. When I ran it manually, I received the following error (click here to check the full output of the workflow):
[INFO] Regenerate releases: ['v2.1.2', 'v2.1.1', 'v2.1.0', 'v2.0.3', 'v2.0.2', 'v2.0.1', 'v2.0.0', 'v1.2.2', 'v1.2.1', 'v1.2.0', 'v1.1.0', 'v1.0.5', 'v1.0.4', 'v1.0.3', 'v1.0.2', 'v1.0.1', 'v1.0.0', 'v0.7.2', 'v0.7.1', 'v0.7.0', 'v0.6.0', 'v0.5.0', 'v0.4.0', 'v0.3.0', 'v0.2.0', 'v0.1.2', 'v0.1.1']
Error:  Failed to get release content, message: {'message': 'API rate limit exceeded for installation ID 18128119. If you reach out to GitHub Support for help, please include the request ID DC80:0E08:F85C03:20A6DCE:6558F8C5.', 'documentation_url': 'https://docs.github.com/rest/overview/rate-limits-for-the-rest-api'}
Error:  Failed to get release content, status code: 403

My guess is - since it isn't a new repo - that the Bot exceeds an internal GitHub API rate limit while trying to process all existing releases at once. I tried rerunning the bot after about 2 hours without running any other bot but with the same result. Any ideas how I can handle this situation?


EDIT: Just re-read the notes and found the following hint:

NOTES 1: ${{secrets.GITHUB_TOKEN}} has a rate limit smaller than Personal Access Token (PAT), so if you have much more requests(commits, prs, etc.) or face a 403 rate-limit-error, use PAT instead.

I think that will solve my second issue. I'll give it a try.

However, if you have any ideas what goes wrong concerning my first question, please let me know :)

boring-cyborg[bot] commented 8 months ago

Thanks for opening your first issue here! Be sure to follow the issue template!

nicrie commented 8 months ago

NOTES 1 fixed the issues :) - all good now!

BobAnkh commented 8 months ago

Weirdly, the action is not triggered automatically. But I think this is an issue related to Github(maybe because the release is made by action?). But I think there might be a workaround: you can trigger the changelog action after your release action.

nicrie commented 7 months ago

Thank you! I'll give it a try!

github-actions[bot] commented 7 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue.