diff --git a/buildbot_gitea/step_source.py b/buildbot_gitea/step_source.py index dfb6b25..2a8cb00 100644 --- a/buildbot_gitea/step_source.py +++ b/buildbot_gitea/step_source.py @@ -17,7 +17,7 @@ class Gitea(Git): @defer.inlineCallbacks def _fetch(self, arg): res = yield super(Gitea, self)._fetch(arg) - if self.build.hasProperty("pr_id"): + if self.build.hasProperty("pr_id") and self.repourl == self.build.getProperty("base_git_ssh_url", None): remote = yield self._dovccmd( ['config', 'remote.pr_source.url'], collectStdout=True, abandonOnFailure=False) if remote is None or remote.strip() is '': @@ -30,4 +30,4 @@ class Gitea(Git): self.build.getProperty("head_git_ssh_url", None)]) yield self._dovccmd(['fetch', 'pr_source']) res = yield self._dovccmd(['merge', self.build.getProperty("head_sha", None)]) - defer.returnValue(res) \ No newline at end of file + defer.returnValue(res)