From 439c7716cc00195a9944c630695c2ce1d4f14564 Mon Sep 17 00:00:00 2001 From: Amir Sarabadani Date: Sun, 27 Mar 2022 01:42:46 +0100 Subject: [PATCH] new_wikis_handler: Fix post-creation checklist This breaks the bot before it gets to wikistats/wikidata/pywikibot --- new_wikis_handler.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/new_wikis_handler.py b/new_wikis_handler.py index f9f9181..f6013c9 100644 --- a/new_wikis_handler.py +++ b/new_wikis_handler.py @@ -100,8 +100,7 @@ class PostCreationHandler(object): ) restbase = get_file_from_gerrit(path) self.add_checklist(gerrit_path + path, 'RESTbase', self.url in restbase) - if self.url in restbase: - self.handlers_needed['restbase'] = False + self.handlers_needed['restbase'] = self.url not in restbase def _handle_restbase(self): if not self.handlers_needed['restbase']: @@ -166,8 +165,11 @@ class PostCreationHandler(object): pywikibot = get_file_from_gerrit(path) self.add_checklist(gerrit_path + path, 'Pywikibot', "'{}'".format(self.language_code) in pywikibot) + self.handlers_needed['pywikibot'] = "'{}'".format(self.language_code) not in pywikibot def _handle_pywikibot(self): + if not self.handlers_needed['pywikibot']: + return client.createSubtask( 'Per https://wikitech.wikimedia.org/wiki/Add_a_wiki once the wiki has been created', ['PHID-PROJ-orw42whe2lepxc7gghdq'],