This version is an update to Wikiploy version 2.1 which introduced a setupSummary()
function.
setupSummary is a helper function that can replace your usages of userPrompt
. It prompts a user running wikiploy for a summary of changes. It can optionally add a version number to the full summary of deploy-edits.
Parameters
ployBot
: AWikiploy
bot object. This is required to setup thesummary()
function.version
(optional): The version of your gadget. Defaults to an empty string if not provided.standardSummary
(optional): A string that provides a standard summary. Defaults to "changes from Github".
If your answer to the prompt would be: "fixed bug #123", you would get a full summary: "v5.6.0: fixed bug #123" (v${version}: ${summary}
).
For no answer you would get: "v5.6.0: changes from Github".
Usage
Basic usage:
// custom summary from a prompt
await setupSummary(ployBot);
Version from package:
(async () => {
// custom summary from a prompt
let version = await readVersion('package.json');
await setupSummary(ployBot, version);
// [...]
await ployBot.deploy(configs);
})().catch(err => {
console.error(err);
process.exit(1);
});