1
0
Fork 0
mirror of https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot synced 2024-11-21 19:42:38 +01:00

Make wikistats a parent ticket

Handling wikistats is blocked until the wiki is created, meaning this
would be a parent ticket of creating the wiki
This commit is contained in:
Amir Sarabadani 2020-12-19 17:40:27 +01:00
parent 1e0f5ee340
commit 5c3e10ffd0

View file

@ -168,11 +168,7 @@ def handle_subticket_for_cloud(task_details, db_name, wiki_status):
'PHID-PROJ-bj6y6ks7ampcwcignhce' # Data services
], task_details['phid'], 'Prepare and check storage layer for ' + db_name)
def handle_subticket_for_wikistats(task_details, db_name):
hasSubtasks = client.getTaskSubtasks(task_details['phid'])
if hasSubtasks:
return
def handle_ticket_for_wikistats(task_details, db_name):
client.createSubtask("Please add new wiki `%s` to Wikistats, once it is created. Thanks!" % db_name, [
'PHID-PROJ-6sht6g4xpdii4c4bga2i' # VPS-project-Wikistats
], task_details['phid'], 'Add %s to wikistats' % db_name)
@ -457,7 +453,6 @@ def hande_task(task_details):
dns = handle_dns(special, url, language_code, task_tid)
if not special and wiki_spec.get('Special', '').lower() != 'yes':
handle_subticket_for_cloud(task_details, db_name, visibility)
handle_subticket_for_wikistats(task_details, db_name)
apache = handle_apache(special, parts)
langdb = handle_langdb(language_code)
core_lang = handle_core_lang(language_code)
@ -480,6 +475,7 @@ def hande_task(task_details):
handle_analytics('.'.join(parts[:2]), task_tid)
handle_pywikibot(parts[1], language_code, not create_tickets, db_name, task_details['phid'])
handle_wikidata(db_name, not create_tickets, task_details['phid'])
handle_ticket_for_wikistats(task_details, db_name)
add_text(' [] Import from Incubator')
add_text(' [] Clean up old interwiki links')
add_text(' [] Propose the implementation of the standard bot policy')