mirror of
https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot
synced 2024-11-22 03:52:37 +01:00
new_wikis_handler: Fix post-creation checklist
This breaks the bot before it gets to wikistats/wikidata/pywikibot
This commit is contained in:
parent
9cd5be9296
commit
439c7716cc
1 changed files with 4 additions and 2 deletions
|
@ -100,8 +100,7 @@ class PostCreationHandler(object):
|
||||||
)
|
)
|
||||||
restbase = get_file_from_gerrit(path)
|
restbase = get_file_from_gerrit(path)
|
||||||
self.add_checklist(gerrit_path + path, 'RESTbase', self.url in restbase)
|
self.add_checklist(gerrit_path + path, 'RESTbase', self.url in restbase)
|
||||||
if self.url in restbase:
|
self.handlers_needed['restbase'] = self.url not in restbase
|
||||||
self.handlers_needed['restbase'] = False
|
|
||||||
|
|
||||||
def _handle_restbase(self):
|
def _handle_restbase(self):
|
||||||
if not self.handlers_needed['restbase']:
|
if not self.handlers_needed['restbase']:
|
||||||
|
@ -166,8 +165,11 @@ class PostCreationHandler(object):
|
||||||
pywikibot = get_file_from_gerrit(path)
|
pywikibot = get_file_from_gerrit(path)
|
||||||
self.add_checklist(gerrit_path + path, 'Pywikibot',
|
self.add_checklist(gerrit_path + path, 'Pywikibot',
|
||||||
"'{}'".format(self.language_code) in pywikibot)
|
"'{}'".format(self.language_code) in pywikibot)
|
||||||
|
self.handlers_needed['pywikibot'] = "'{}'".format(self.language_code) not in pywikibot
|
||||||
|
|
||||||
def _handle_pywikibot(self):
|
def _handle_pywikibot(self):
|
||||||
|
if not self.handlers_needed['pywikibot']:
|
||||||
|
return
|
||||||
client.createSubtask(
|
client.createSubtask(
|
||||||
'Per https://wikitech.wikimedia.org/wiki/Add_a_wiki once the wiki has been created',
|
'Per https://wikitech.wikimedia.org/wiki/Add_a_wiki once the wiki has been created',
|
||||||
['PHID-PROJ-orw42whe2lepxc7gghdq'],
|
['PHID-PROJ-orw42whe2lepxc7gghdq'],
|
||||||
|
|
Loading…
Reference in a new issue