From d7943bfb3a9bb70681318922589623a77b906fb4 Mon Sep 17 00:00:00 2001 From: Alexandra Borovova Date: Fri, 23 Jan 2026 12:27:17 +0100 Subject: [PATCH] Fix "set-pr" command. --- sync/command.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sync/command.py b/sync/command.py index c45177977..2c7fa51b6 100644 --- a/sync/command.py +++ b/sync/command.py @@ -1194,10 +1194,11 @@ def do_set_pr( pr = env.gh_wpt.get_pull(pr_number) if pr is None: logger.error(f"PR {pr_number} not found") - else: - for commit in commits: - wpt_commit = WptCommit(git_wpt, commit) - wpt_commit.notes["wpt_pr"] = str(pr_number) + return + + for commit in commits: + wpt_commit = WptCommit(git_wpt, commit) + wpt_commit.notes["wpt_pr"] = str(pr_number) def set_config(opts: list[str]) -> None: