From a36953b52d6bb9a52da2f5edce9abba18bd595c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 3 May 2024 12:16:18 +0200 Subject: [PATCH] gitea: fix testing pull requests --- buildbot_nix/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/buildbot_nix/__init__.py b/buildbot_nix/__init__.py index c093adb..e16fdea 100644 --- a/buildbot_nix/__init__.py +++ b/buildbot_nix/__init__.py @@ -295,8 +295,13 @@ class GitLocalPrMerge(steps.Git): patch: str, ) -> Generator[Any, object, Any]: build_props = self.build.getProperties() - merge_base = build_props.getProperty("github.base.sha") - pr_head = build_props.getProperty("github.head.sha") + # TODO: abstract this into an interface as well + merge_base = build_props.getProperty( + "github.base.sha" + ) or build_props.getProperty("base_sha") + pr_head = build_props.getProperty("github.head.sha") or build_props.getProperty( + "head_sha" + ) # Not a PR, fallback to default behavior if merge_base is None or pr_head is None: