github-release: iterate all pages of releases#195
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds pagination support to the GitHub release sync script, iterating through all pages of releases using the Link header from GitHub's API responses, instead of only fetching the first page.
Changes:
- Refactored release fetching into a
release_generator()that follows paginationLinkheaders - Wrapped release processing in a try/except to handle generator exceptions
- Updated error messages ("Cannot" → "Failed to")
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
github-release.py
Outdated
| except Exception: | ||
| logger.error(f"Failed to process releases for {repo}") |
github-release.py
Outdated
| except Exception: | ||
| logger.error(f"Failed to process releases for {repo}") |
5cc90bb to
4bc677b
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds pagination support to the GitHub release fetching logic, iterating through all pages of releases instead of only fetching the first page. This fixes #170 where not all releases were being retrieved.
Changes:
- Replaced single API call with a
release_generator()that follows paginationLinkheaders - Wrapped release processing in a try/except to handle errors from the generator
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
github-release.py
Outdated
| logger.error( | ||
| f"Failed to download metadata for {repo}: {e}", | ||
| ) | ||
| raise e |
|
|
||
| try: | ||
| def release_generator(): | ||
| url = "" |
4bc677b to
e757019
Compare
Closes: #171