Skip to content

Conversation

@Fibonacci747
Copy link

The previous pagination logic placed the resp.NextPage == 0 check in an unreachable else if branch competing with TagPrefix conditions. As a result, when TagPrefix != "" and no matching release is found on the last page, the code set options.Page = 0 and could loop indefinitely.

This change:

  • Moves the resp.NextPage == 0 termination check to run before assigning options.Page = resp.NextPage.
  • Removes the unreachable else if resp.NextPage == 0 branch.

The new flow follows the official go-github pagination example pattern, ensuring the loop exits correctly and preventing infinite iteration.

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Oct 26, 2025

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@github-actions
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Nov 14, 2025
@github-actions
Copy link
Contributor

This pull request was closed because it has been inactive for 5 days since being marked as stale.

@github-actions github-actions bot closed this Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants