fix(ci): paginate issue listing in weekly sdk tier assessment#721
Open
anubhav756 wants to merge 1 commit into
Open
fix(ci): paginate issue listing in weekly sdk tier assessment#721anubhav756 wants to merge 1 commit into
anubhav756 wants to merge 1 commit into
Conversation
## Overview Fixes a bug in the `Weekly SDK Tier Assessment` workflow where older open assessment issues were not found, leading to duplicate issue creation. ## Problem The workflow calls `github.rest.issues.listForRepo` directly without pagination. The GitHub REST API defaults to returning only the first 30 open issues (sorted descending by creation date). For repositories with a high number of open issues, older SDK assessment issues are pushed beyond the first page and are not returned in the result. Consequently, the workflow fails to find the existing open issue and creates a new one instead of updating it. ## Solution Replaced the direct `github.rest.issues.listForRepo` call with `github.paginate(github.rest.issues.listForRepo, ...)` to retrieve all open issues in the repository before searching for the matching title. This aligns the issue checking with the pattern already used in `cloud_build_failure_reporter.yml`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Fixes a bug in the
Weekly SDK Tier Assessmentworkflow where older open assessment issues were not found, leading to duplicate issue creation.Problem
The workflow calls
github.rest.issues.listForRepodirectly without pagination. The GitHub REST API defaults to returning only the first 30 open issues (sorted descending by creation date).For repositories with a high number of open issues, older SDK assessment issues are pushed beyond the first page and are not returned in the result. Consequently, the workflow fails to find the existing open issue and creates a new one instead of updating it.
Solution
Replaced the direct
github.rest.issues.listForRepocall withgithub.paginate(github.rest.issues.listForRepo, ...)to retrieve all open issues in the repository before searching for the matching title. This aligns the issue checking with the pattern already used incloud_build_failure_reporter.yml.Note
The corresponding change in Toolbox server is in googleapis/mcp-toolbox#3658.