Dachary has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316597

Change subject: qa: do not error when nothing is available
......................................................................

qa: do not error when nothing is available

When there are no source code repositories or CI found in existing
source code repositories or no CI claims to verify, just silentely do
nothing instead of displaying an error.

For a verification to happen, there needs to be at least one source code
repository and at least one CI claim. There may exist CI claims that are
unrelated to source code repositories.

Change-Id: Ic1bbee4f8e76771505aa23debc8bf40a81123216
Signed-off-by: Loic Dachary <l...@dachary.org>
---
M FLOSSbot/qa.py
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/bots/FLOSSbot 
refs/changes/97/316597/1

diff --git a/FLOSSbot/qa.py b/FLOSSbot/qa.py
index da3bee5..fa44e3d 100644
--- a/FLOSSbot/qa.py
+++ b/FLOSSbot/qa.py
@@ -76,14 +76,15 @@
             if claim.getTarget() == self.Q_Continuous_integration:
                 has_ci = True
         if not has_ci:
+            self.debug(item, "verify: no ci to verify")
             return ['no ci']
         repositories = item.claims.get(self.P_source_code_repository, [])
         if len(repositories) == 0:
-            self.error(item, "has no source code repository")
+            self.debug(item, "verify: has no source code repository")
             return ['no repository']
         found = self.extract_ci(item, repositories)
         if not found:
-            self.error(item, "verify: no ci found")
+            self.debug(item, "verify: no ci found")
             return ['no ci found']
         self.debug(item, "repositories have " + str(found))
         url2qa = {}

-- 
To view, visit https://gerrit.wikimedia.org/r/316597
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1bbee4f8e76771505aa23debc8bf40a81123216
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/bots/FLOSSbot
Gerrit-Branch: master
Gerrit-Owner: Dachary <l...@dachary.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to