Skip to content

Commit

Permalink
Add notables to commmit msg body
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Mar 1, 2020
1 parent f68a391 commit 1210673
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion components/git/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async function main(state, argv, cli, req, dir) {
// Check the branch diff to determine if the releaser
// wants to backport any more commits before proceeding.
cli.startSpinner('Fetching branch-diff');
const raw = release.checkBranchDiff();
const raw = release.getBranchDiff();
const diff = raw.split('*');
cli.stopSpinner('Got branch diff');

Expand Down
2 changes: 1 addition & 1 deletion lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CLI {
}

// TODO(codebytere): fold this into an options object
// for cli.prompt() ans refactor accordingly.
// for cli.prompt() and refactor accordingly.
async promptInput(question, showSeparator = true) {
if (showSeparator) this.separator();
const { answer } = await inquirer.prompt([{
Expand Down
12 changes: 6 additions & 6 deletions lib/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class Release {
'`git commit --amend` before proceeding.');

await cli.prompt(
'Type y when you have finished editing the release commit:',
'Finished editing the release commit?',
false);
}

Expand All @@ -125,7 +125,7 @@ class Release {
' * https://ci.nodejs.org/job/node-test-pull-request/\n' +
' * https://ci.nodejs.org/job/citgm-smoker/');
cli.info(
'If this release deps/v8 changes, you\'ll also need to run:\n' +
'If this release has deps/v8 changes, you\'ll also need to run:\n' +
' * https://ci.nodejs.org/job/node-test-commit-v8-linux/'
);
}
Expand Down Expand Up @@ -253,7 +253,7 @@ class Release {
lastRef
]);

const notableChanges = this.checkBranchDiff(true);
const notableChanges = this.getBranchDiff(true);
const releaseHeader = `## ${date}, Version ${newVersion}` +
` ${releaseInfo}, @${username}\n`;

Expand Down Expand Up @@ -334,9 +334,9 @@ class Release {
messageBody.push('This is a security release.\n\n');
}

const notableChanges = this.getBranchDiff(true);
messageBody.push('Notable changes:\n\n');

// TODO(codebytere): add notable changes formatted for plaintext.
messageBody.push(notableChanges);

// Create commit and then allow releaser to amend.
runSync('git', ['add', '.']);
Expand All @@ -353,7 +353,7 @@ class Release {
return useMessage;
}

checkBranchDiff(onlyNotableChanges = false) {
getBranchDiff(onlyNotableChanges = false) {
const {
versionComponents,
stagingBranch,
Expand Down

0 comments on commit 1210673

Please sign in to comment.