Repository navigation
Conversation
zhumin8
marked this pull request as ready for review
October 28, 2026 19:21
quartzmo
requested changes
Oct 29, 2026
| def open_pr_exists? | ||
| return false unless git_remote | ||
| require "json" | ||
| result = exec ["gh", "pr", "list", "--search", "\"#{COMMIT_MESSAGE}\" in:title", |
Member
There was a problem hiding this comment.
If I am reading this right, this search matches any open PR with this title, whoever opened it. The repo is public, so anyone could open a PR titled "chore(generator): sync Gemfile.lock" from a fork, and the sync would then skip until it's closed, bringing back the regen failure. Would adding --author @me work here? gh resolves @me to the token's user (yoshi-code-bot in the workflow), and --author combines with --search.
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.
The weekly API regeneration fails with "Git checkout is not clean" whenever
google-apis-generator/Gemfile.lockis stale. That happens after a google-apis-core or google-apis-generator release, or a dependency change in their gemspecs, and needed manual fixes twice (#28168, #28303).This adds a workflow that keeps the lockfile in sync:
mainthat changes the core or generatorversion.rb, their gemspecs,google-apis-generator/Gemfile, or the lockfile itself (to re-check after a sync PR merges). Also manual dispatch. Runs are queued, not run in parallel.toys sync-generator-lockfilerunsbundle lock(without--update) ingoogle-apis-generator/. If the lockfile changed, it opens a PR from yoshi-code-bot titledchore(generator): sync Gemfile.lock, unless one is already open.Until auto-approve covers these PRs (follow-up), someone needs to review and merge them.
Tested locally: from the stale lockfile (google-apis-core 1.3.2), the tool produces exactly the lockfile from #28303; with an up-to-date lockfile it makes no change.