Skip to content

Commit

Permalink
Clarify error msg for unreleased flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Feb 17, 2021
1 parent db3d1c9 commit d9e7e97
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions bin/plugin/commands/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,15 @@ async function getChangelog( settings ) {

const pullRequests = await fetchAllPullRequests( octokit, settings );
if ( ! pullRequests.length ) {
throw new Error(
'There are no pull requests associated with the milestone.'
);
if ( settings.unreleased ) {
throw new Error(
'There are no unreleased pull requests associated with the milestone.'
);
} else {
throw new Error(
'There are no pull requests associated with the milestone.'
);
}
}

let changelog = '';
Expand Down

0 comments on commit d9e7e97

Please sign in to comment.