From d14328329c628e7c6609b81f30bfa6364de601b5 Mon Sep 17 00:00:00 2001 From: Alexandra Borovova Date: Mon, 2 Feb 2026 18:51:32 +0100 Subject: [PATCH] Do not merge commits without PR number or with PR number set to "0". --- sync/landing.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sync/landing.py b/sync/landing.py index 106abe2f2..a7f9184d0 100644 --- a/sync/landing.py +++ b/sync/landing.py @@ -980,7 +980,10 @@ def unlanded_wpt_commits_by_pr( wpt_commit = sync_commit.WptCommit(git_wpt, commit.hexsha) pr = wpt_commit.pr() extra_commits = [] - if pr not in index_by_pr: + + # If we fail to identify the PR number or the PR number is set to `0`, + # do not try to group it with other commits. + if pr is None or pr == 0 or pr not in index_by_pr: pr_data: tuple[int | None, list[WptCommit]] = (pr, []) # If we have a merge commit, also get the commits merged in if len(commit.parents) > 1: