41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
|
From 6c287ad5735882f71ffa07722f7205eb3bf85269 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
|
||
|
Date: Mon, 27 May 2024 14:20:41 +0200
|
||
|
Subject: [PATCH] reporter: create status in the base repository of a pull
|
||
|
requests
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
Buildbot might not have access to the build status of the fork
|
||
|
and for pull request we want the information in the pull request
|
||
|
window rather than the commit on the fork.
|
||
|
|
||
|
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
|
||
|
---
|
||
|
buildbot_gitea/reporter.py | 6 ++----
|
||
|
1 file changed, 2 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/buildbot_gitea/reporter.py b/buildbot_gitea/reporter.py
|
||
|
index 85d0a39..27347f2 100644
|
||
|
--- a/buildbot_gitea/reporter.py
|
||
|
+++ b/buildbot_gitea/reporter.py
|
||
|
@@ -164,12 +164,10 @@ def _send_impl(self, reports):
|
||
|
if sha is None:
|
||
|
# No special revision for this, so ignore it
|
||
|
continue
|
||
|
- # If this is a pull request, send the status to the head repository
|
||
|
if 'pr_id' in props:
|
||
|
- repository_name = props['head_reponame']
|
||
|
- repository_owner = props['head_owner']
|
||
|
sha = props['head_sha']
|
||
|
- elif 'repository_name' in props:
|
||
|
+
|
||
|
+ if 'repository_name' in props:
|
||
|
repository_name = props['repository_name']
|
||
|
else:
|
||
|
match = re.match(self.ssh_url_match, sourcestamp['repository'])
|
||
|
--
|
||
|
2.44.1
|
||
|
|