[Patchew-devel] [PATCH] git: only mark as pending the series for which a git push repo is configured

Paolo Bonzini posted 1 patch 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/patchew-ci tags/patchew/20220227061317.37057-1-pbonzini@redhat.com
mods/git.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
[Patchew-devel] [PATCH] git: only mark as pending the series for which a git push repo is configured
Posted by Paolo Bonzini 7 months ago
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 mods/git.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/mods/git.py b/mods/git.py
index bcaab7c..47b6e17 100644
--- a/mods/git.py
+++ b/mods/git.py
@@ -110,8 +110,16 @@ class GitModule(PatchewModule):
         register_handler("SeriesComplete", self.on_series_update)
         register_handler("TagsUpdate", self.on_tags_update)
 
+    def project_has_git_config(self, project)
+        config = self.get_project_config(project)
+        return "push_to" in config
+
     def mark_as_pending_apply(self, series, data={}):
-        r = series.git_result or series.create_result(name="git")
+        r = series.git_result
+        if not r:
+            if not self.project_has_git_config(project):
+                return
+            r = series.create_result(name="git")
         r.log = None
         r.status = Result.PENDING
         r.data = data
-- 
2.34.1

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/patchew-devel