mirror of
https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot
synced 2025-01-03 00:10:58 +01:00
new_wikis_handler: Adopt the checklist to make config patches
Reduces the chance of typos and oopsies
This commit is contained in:
parent
eaf75ce919
commit
3af446ee71
1 changed files with 10 additions and 4 deletions
|
@ -411,12 +411,14 @@ def get_db_name(wiki_spec, parts):
|
|||
return db_name
|
||||
|
||||
|
||||
def add_create_instructions(parts, shard, language_code, db_name, task_tid):
|
||||
def add_create_instructions(language_code, db_name, family, visibility):
|
||||
add_text('\n-------')
|
||||
add_text('**Step by step commands**:')
|
||||
add_text('Locally (in mediawiki-config repo):')
|
||||
add_text('`composer manage-dblist prepare {db_name} {lang_code} {family} {visibility}`'.format(
|
||||
db_name=db_name, lang_code=language_code, family=family, visibility=visibility))
|
||||
add_text('On deployment host:')
|
||||
add_text('`scap sync-world "Creating {db_name} ({phab})"`'.format(
|
||||
db_name=db_name, phab=task_tid))
|
||||
add_text('`scap backport #patch-id`')
|
||||
|
||||
add_text('On maintenance host:')
|
||||
addwiki_path = 'mwscript extensions/WikimediaMaintenance/addWiki.php'
|
||||
|
@ -425,7 +427,11 @@ def add_create_instructions(parts, shard, language_code, db_name, task_tid):
|
|||
addwiki_path=addwiki_path,
|
||||
db=db_name))
|
||||
|
||||
add_text('Locally (in mediawiki-config repo):')
|
||||
add_text('`composer manage-dblist activate {db_name}`'.format(db_name=db_name))
|
||||
|
||||
add_text('On deployment host:')
|
||||
add_text('`scap backport #patch-id`')
|
||||
add_text('`scap update-interwiki-cache`')
|
||||
|
||||
|
||||
|
@ -507,7 +513,7 @@ def handle_task(task_details):
|
|||
handler = PostCreationHandler(task_details['phid'], db_name, url, language_code, parts)
|
||||
handler.handle()
|
||||
|
||||
add_create_instructions(parts, shard, language_code, db_name, task_tid)
|
||||
add_create_instructions(language_code, db_name, parts[1], visibility)
|
||||
add_text('\n**End of automatic output**')
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue