1
0
Fork 0
mirror of https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot synced 2024-12-23 02:50:53 +01:00

new_wikis_handler: dbname never includes dashes, instead, it uses underscores

zh-classical.wikipedia.org should map to zh_classicalwiki
This commit is contained in:
Martin Urbanec 2020-07-10 20:24:21 +00:00
parent dbb3ee2c40
commit 0b2010dded

View file

@ -83,6 +83,7 @@ def hande_task(phid):
parts = url.split('.')
if len(parts) != 3 or parts[2] != 'org':
return
if parts[1] == 'wikimedia':
dns = handle_special_wiki_dns(parts)
special = True
@ -104,9 +105,9 @@ def hande_task(phid):
add_text(' [x] [[{}|DNS]]'.format(dns_url))
if parts[1] == 'wikipedia':
db_name = parts[0] + 'wiki'
db_name = parts[0].replace('-', '_') + 'wiki'
else:
db_name = parts[0] + parts[1]
db_name = parts[0].replace('-', '_') + parts[1]
handle_subticket_for_cloud(client.lookupPhid('T251371'), task_details, db_name)