Add one-off script for patch 7.3 stellar mission name changes

This commit is contained in:
ewin 2025-08-05 11:45:21 -04:00
parent 8e89e05756
commit 7b5357c050
Signed by: erin
SSH key fingerprint: SHA256:swjoHhREbZPbWe+gyJNi24d4NAxJSyUIm3fpZj4z3wc
2 changed files with 170 additions and 0 deletions

View file

@ -162,6 +162,40 @@ export class MediaWikiClient {
return body;
}
/**
*
* @param {string} from The page's current name
* @param {string} to The page's new name
* @param {object} options
* @param {string} options.reason Move reason
* @param {boolean} options.redirect Whether to create a redirect from the
* old name to the new name
* @param {boolean} options.moveTalk Whether to move the page's talk page
* from the old name to the new name
* @param {boolean} options.moveSubpages Whether to move the page's subpages
* from the old name to the new name
* @returns {Promise<any>}
*/
async movePage (from, to, {
reason,
redirect = true,
moveTalk = true,
moveSubpages = true,
} = {}) {
const csrfToken = await this.getCSRFToken();
return this.fetchApiPost({
action: 'move',
from,
to,
reason,
movetalk: moveTalk,
movesubpages: moveSubpages,
noredirect: !redirect,
token: csrfToken,
format: 'json',
});
}
/**
* Gets the list of wiki pages that belong to the given category.
* @param {string} name Category name including the `Category:` namespace.