gitea: fix testing pull requests

This commit is contained in:
Jörg Thalheim 2024-05-03 12:16:18 +02:00 committed by mergify[bot]
parent 5e37a99685
commit a36953b52d

View file

@ -295,8 +295,13 @@ class GitLocalPrMerge(steps.Git):
patch: str, patch: str,
) -> Generator[Any, object, Any]: ) -> Generator[Any, object, Any]:
build_props = self.build.getProperties() build_props = self.build.getProperties()
merge_base = build_props.getProperty("github.base.sha") # TODO: abstract this into an interface as well
pr_head = build_props.getProperty("github.head.sha") 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 # Not a PR, fallback to default behavior
if merge_base is None or pr_head is None: if merge_base is None or pr_head is None: