Skip to content

Pull Request pagination fixes #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 11, 2025
Merged

Pull Request pagination fixes #11

merged 3 commits into from
Apr 11, 2025

Conversation

GrantBirki
Copy link
Member

This PR fixes the lack of pagination when fetching pull requests from the GitHub API.

@GrantBirki GrantBirki added bug Something isn't working enhancement New feature or request labels Apr 11, 2025
@Copilot Copilot AI review requested due to automatic review settings April 11, 2025 23:32
Copy link
Contributor

@Copilot 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 addresses the pagination issue when fetching pull requests from the GitHub API by introducing a new helper function that iteratively retrieves all open pull requests.

  • Replaces a single API GET call with a paginated approach in the new fetchOpenPullRequests function.
  • Updates error messages and logging for clearer diagnostic information in both PR fetching and branch matching logic.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
internal/cmd/root.go Implements pagination for pull request fetching and improves logging.
internal/cmd/match_criteria.go Incorporates additional debug logging in branch criteria matching.

@GrantBirki GrantBirki merged commit 5b312fd into main Apr 11, 2025
7 checks passed
@GrantBirki GrantBirki deleted the pr-pagination-fixes branch April 11, 2025 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant