[ML] Fix auto-approve version-bump workflow for current gh CLI - #3153
Open
edsavage wants to merge 1 commit into
Open
[ML] Fix auto-approve version-bump workflow for current gh CLI#3153edsavage wants to merge 1 commit into
edsavage wants to merge 1 commit into
Conversation
gh api rejects combining --paginate --slurp with --jq, which made the Auto-approve version bump step fail on recent patch bumps. Count approvals per page and sum instead. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Pinging @elastic/ml-core (Team:ML) |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the auto-approval workflow for automated version-bump PRs by updating the gh api pagination logic to be compatible with the current GitHub CLI behavior on ubuntu-latest.
Changes:
- Replace the unsupported
gh api --paginate --slurp ... --jq ...usage with per-page counting via--paginate --jq. - Sum per-page approval counts with
awkto preserve the original “count across all pages” behavior.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
#3146/#3147/#3148) becausegh api --paginate --slurp … --jq …is rejected by currentgh(the --slurp option is not supported with --jq or --template).--paginate --jqand sum withawkinstead.pull_request_targetfor bump PRs (8.19,9.4,9.5).Test plan
gh api --paginate --slurp … --jq …still fails as on CI0for#3148and1for#3150(bot-approved backport)Made with Cursor