feat(scripts): collect PR URLs and prompt once at end of run#10
Merged
Conversation
Previously cargo_update.sh, bring_up_to_date.sh, and template_backport.sh each opened the resulting PR URL in a browser tab automatically the moment they finished. When run via the *_all drivers across many downstream repos, this dumped a flurry of distracting tabs into the foreground. Add scripts/lib/pr_prompt.sh, a small shared helper that: - extracts PR URLs from script output - lists collected URLs at the end of a run - only prompts to open them if stdin/stdout are a TTY and the new PR_PROMPT_SUPPRESS env var is unset Wire all single-repo scripts to use the helper instead of auto-opening. The *_all drivers export PR_PROMPT_SUPPRESS=1 around child invocations (so children stay quiet), then collect URLs from per-repo logs and call pr_prompt_finalize once at the very end. bring_up_to_date_all now tees child output to per-repo log files so URLs can be harvested.
5 tasks
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
Stops the update scripts from opening browser tabs the moment each PR is created. Instead, URLs are collected and the user is asked once at the end of the run whether to open them.
Test plan