Skip to content

Commit

Permalink
Add warning on unreleased commits
Browse files Browse the repository at this point in the history
  • Loading branch information
Drarig29 committed Dec 21, 2020
1 parent d913b74 commit 1680ce0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions source/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,22 @@ module.exports = async (options, pkg) => {
const useLatestTag = !options.releaseDraftOnly;
const {hasCommits, releaseNotes} = await printCommitLog(repoUrl, registryUrl, useLatestTag);

if (hasCommits && options.releaseDraftOnly) {
const answers = await inquirer.prompt([{
type: 'confirm',
name: 'confirm',
message: 'Unreleased commits found. They won\'t be included in the release draft, continue?',
default: false
}]);

if (!answers.confirm) {
return {
...options,
...answers
};
}
}

if (options.version) {
return {
...options,
Expand Down

0 comments on commit 1680ce0

Please sign in to comment.