Skip to content

github-release: iterate all pages of releases#195

Merged
shankerwangmiao merged 1 commit intomasterfrom
pr-github-releases
Mar 16, 2026
Merged

github-release: iterate all pages of releases#195
shankerwangmiao merged 1 commit intomasterfrom
pr-github-releases

Conversation

@shankerwangmiao
Copy link
Member

Closes: #171

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 pagination Link headers
  • 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.

Comment on lines +292 to +293
except Exception:
logger.error(f"Failed to process releases for {repo}")
Comment on lines +292 to +293
except Exception:
logger.error(f"Failed to process releases for {repo}")
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 pagination Link headers
  • 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.

logger.error(
f"Failed to download metadata for {repo}: {e}",
)
raise e

try:
def release_generator():
url = ""
@shankerwangmiao shankerwangmiao merged commit a01e8da into master Mar 16, 2026
15 checks passed
@shankerwangmiao shankerwangmiao deleted the pr-github-releases branch March 18, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants