Skip to content

v2.1 edit summary

Latest
Compare
Choose a tag to compare
@Eccenux Eccenux released this 03 Mar 17:44
· 19 commits to main since this release

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: A Wikiploy bot object. This is required to setup the summary() 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);
});