Revert "chore: add Trop annotations to release notes. (#24644)"

This reverts commit b43e601b83.
This commit is contained in:
Samuel Attard 2020-07-21 09:38:28 -07:00
parent 74e7f2773f
commit a76e74ac3f
No known key found for this signature in database
GPG key ID: FB94249299E904FE
3 changed files with 177 additions and 125 deletions

View file

@ -120,7 +120,7 @@ const getPreviousPoint = async (point) => {
}
};
async function getReleaseNotes (range, newVersion) {
async function getReleaseNotes (range, newVersion, explicitLinks) {
const rangeList = range.split('..') || ['HEAD'];
const to = rangeList.pop();
const from = rangeList.pop() || (await getPreviousPoint(to));
@ -129,9 +129,10 @@ async function getReleaseNotes (range, newVersion) {
newVersion = to;
}
console.log(`Generating release notes between ${from} and ${to} for version ${newVersion}`);
const notes = await notesGenerator.get(from, to, newVersion);
const ret = {
text: notesGenerator.render(notes)
text: notesGenerator.render(notes, explicitLinks)
};
if (notes.unknown.length) {
@ -143,7 +144,7 @@ async function getReleaseNotes (range, newVersion) {
async function main () {
const opts = minimist(process.argv.slice(2), {
boolean: ['help'],
boolean: ['explicit-links', 'help'],
string: ['version']
});
opts.range = opts._.shift();
@ -152,13 +153,14 @@ async function main () {
console.log(`
easy usage: ${name} version
full usage: ${name} [begin..]end [--version version]
full usage: ${name} [begin..]end [--version version] [--explicit-links]
* 'begin' and 'end' are two git references -- tags, branches, etc --
from which the release notes are generated.
* if omitted, 'begin' defaults to the previous tag in end's branch.
* if omitted, 'version' defaults to 'end'. Specifying a version is
useful if you're making notes on a new version that isn't tagged yet.
* 'explicit-links' makes every note's issue, commit, or pull an MD link
For example, these invocations are equivalent:
${process.argv[1]} v4.0.1
@ -167,7 +169,7 @@ For example, these invocations are equivalent:
return 0;
}
const notes = await getReleaseNotes(opts.range, opts.version);
const notes = await getReleaseNotes(opts.range, opts.version, opts['explicit-links']);
console.log(notes.text);
if (notes.warning) {
throw new Error(notes.warning);