Skip to content

git-node: add release promotion step #402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Prev Previous commit
Next Next commit
Verify ncurc is set up
  • Loading branch information
codebytere committed May 20, 2020
commit 61dbeb78a0bcfa21ed4ed83a49f119b56d7f9408
15 changes: 11 additions & 4 deletions components/git/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,19 @@ async function main(state, argv, cli, dir) {
const info = new TeamInfo(cli, request, 'nodejs', RELEASERS);

const releasers = await info.getMembers();
if (!releasers.some(r => r.login === release.username)) {
cli.stopSpinner(
`${release.username} is not a Releaser; aborting release`);
if (release.username === undefined) {
cli.stopSpinner('Failed to verify Releaser status');
cli.info(
'Username was undefined - do you have your .ncurc set up correctly?');
return;
} else {
if (!releasers.some(r => r.login === release.username)) {
cli.stopSpinner(
`${release.username} is not a Releaser; aborting release`);
return;
}
cli.stopSpinner('Verified Releaser status');
}
cli.stopSpinner('Verified Releaser status');

return release.promote();
}
Expand Down