mirror of
https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot
synced 2024-12-22 10:30:53 +01:00
Merge branch 'wikireplicas' into 'master'
Create subtask for wikireplicas view creation See merge request ladsgroup/Phabricator-maintenance-bot!18
This commit is contained in:
commit
c0fab3e1d2
1 changed files with 14 additions and 1 deletions
|
@ -54,6 +54,7 @@ class PostCreationHandler(object):
|
|||
self._check_cx,
|
||||
self._check_analytics,
|
||||
self._check_pywikibot,
|
||||
self._check_wikireplicas,
|
||||
self._check_wikidata,
|
||||
]
|
||||
self.handlers = [
|
||||
|
@ -61,6 +62,7 @@ class PostCreationHandler(object):
|
|||
self._handle_cx,
|
||||
self._handle_analytics,
|
||||
self._handle_pywikibot,
|
||||
self._handle_wikireplicas,
|
||||
self._handle_wikidata,
|
||||
self._handle_wikistats,
|
||||
self._handle_incubator,
|
||||
|
@ -185,6 +187,11 @@ class PostCreationHandler(object):
|
|||
self.post_ticket_phid,
|
||||
'Add support for {} to Pywikibot'.format(self.db_name))
|
||||
|
||||
def _check_wikireplicas(self):
|
||||
url = 'https://replag.toolforge.org/'
|
||||
wikireplicas_replag_page = requests.get().text
|
||||
self.add_checklist(url, 'Wiki Replicas', self.db_name in wikireplicas_replag_page)
|
||||
|
||||
def _check_wikidata(self):
|
||||
url = 'https://www.wikidata.org/w/api.php'
|
||||
wikidata_help_page = requests.get(url, params={
|
||||
|
@ -193,6 +200,13 @@ class PostCreationHandler(object):
|
|||
}).text
|
||||
self.add_checklist(url, 'Wikidata', self.db_name in wikidata_help_page)
|
||||
|
||||
def _handle_wikireplicas(self):
|
||||
client.createSubtask(
|
||||
'Follow the procedure at https://wikitech.wikimedia.org/wiki/Portal:Data_Services/Admin/Wiki_Replicas#Adding_a_wiki', [
|
||||
'PHID-PROJ-d3h5oaspnvdwfjklmivl/', # cloud-services-team
|
||||
'PHID-PROJ-bj6y6ks7ampcwcignhce' # Data-Services
|
||||
], self.post_ticket_phid, '[wikireplicas] Create views for new wiki {}'.format(self.db_name))
|
||||
|
||||
def _handle_wikidata(self):
|
||||
client.createSubtask(
|
||||
'Per https://wikitech.wikimedia.org/wiki/Add_a_wiki once the wiki has been created',
|
||||
|
@ -247,7 +261,6 @@ def handle_subticket_for_cloud(task_details, db_name, wiki_status):
|
|||
|
||||
client.createSubtask("The new wiki's visibility will be: **%s**." % wiki_status, [
|
||||
'PHID-PROJ-hwibeuyzizzy4xzunfsk', # DBA
|
||||
'PHID-PROJ-bj6y6ks7ampcwcignhce' # Data services
|
||||
], task_details['phid'], 'Prepare and check storage layer for ' + db_name)
|
||||
|
||||
def handle_ticket_for_wikistats(task_details, db_name):
|
||||
|
|
Loading…
Reference in a new issue