From d000a19748319046fa81e93a3a0f1da0464835a5 Mon Sep 17 00:00:00 2001 From: Jerry Zhang Date: Thu, 1 Oct 2026 18:17:00 -0700 Subject: [PATCH] upload: Check pre_upload right after creating commits This gets us 2 things - dry-run now runs the pre upload command, which can be a useful way to run the preupload on all your topics (otherwise topics marked rebase aren't passed to the command) - the pre upload command will run before pausing and prompting the user. --- revup/upload.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/revup/upload.py b/revup/upload.py index 0175b7d..122f3dc 100644 --- a/revup/upload.py +++ b/revup/upload.py @@ -117,6 +117,12 @@ async def run( yield UploadPhase.COMMITS_CREATED, topics + if args.pre_upload and not args.no_verify: + ref_args = topics.get_pushed_ref_args() + if ref_args: + with get_console().status("Running pre-upload command"): + run_pre_upload(args.pre_upload, ref_args, git_ctx.repo_root) + if args.dry_run: topics.print(not args.verbose) return @@ -127,17 +133,12 @@ async def run( args.force_reviewers, args.pr_body_source, ) + if not args.skip_confirm and topics.num_reviews_changed() > 0: topics.print(not args.verbose) if git_ctx.sh.wait_for_confirmation(): return - if args.pre_upload and not args.no_verify: - ref_args = topics.get_pushed_ref_args() - if ref_args: - with get_console().status("Running pre-upload command"): - run_pre_upload(args.pre_upload, ref_args, git_ctx.repo_root) - yield UploadPhase.READY_TO_PUSH, topics if not skip_push: