diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/tidy/tidy.py | 2 | ||||
-rw-r--r-- | python/wpt/run.py | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/python/tidy/tidy.py b/python/tidy/tidy.py index 45e4260ab13..4e3bca9f5b4 100644 --- a/python/tidy/tidy.py +++ b/python/tidy/tidy.py @@ -153,7 +153,7 @@ class FileList(object): yield os.path.join(root, f) def _git_changed_files(self): - args = ["git", "log", "-n1", "--merges", "--format=%H"] + args = ["git", "log", "-n1", "--committer", "noreply@github.com", "--format=%H"] last_merge = subprocess.check_output(args, universal_newlines=True).strip() if not last_merge: return diff --git a/python/wpt/run.py b/python/wpt/run.py index ae0fde9cb27..2b3cad5d563 100644 --- a/python/wpt/run.py +++ b/python/wpt/run.py @@ -223,9 +223,17 @@ class TrackerDashboardFilter(): run_id = github_context['run_id'] build_url = f"{repo_url}/actions/runs/{run_id}" - commit_title = github_context["event"]["head_commit"]["message"] - match = re.match(r"^Auto merge of #(\d+)", commit_title) - pr_url = f"{repo_url}/pull/{match.group(1)}" if match else None + commit_title = "<no title>" + if "merge_group" in github_context["event"]: + commit_title = github_context["event"]["merge_group"]["head_commit"]["message"] + if "head_commit" in github_context["event"]: + commit_title = github_context["event"]["head_commit"]["message"] + + pr_url = None + match = re.match(r"^Auto merge of #(\d+)", commit_title) or \ + re.match(r"\(#(\d+)\)", commit_title) + if match: + pr_url = f"{repo_url}/pull/{match.group(1)}" if match else None return GithubContextInformation( build_url, |