Skip to content

Commit

Permalink
build(CD): create other:changelog script with tested by jest
Browse files Browse the repository at this point in the history
  • Loading branch information
rezaelahidev committed Sep 7, 2024
1 parent 989618e commit 082eabe
Show file tree
Hide file tree
Showing 17 changed files with 14,502 additions and 606 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ assets/*
wordpress*
**/test/*
**/stories/*
/bin/plugin/**
33 changes: 33 additions & 0 deletions bin/plugin/cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env node

/**
* External dependencies
*/
const program = require('commander');

const catchException = (command) => {
return async (...args) => {
try {
await command(...args);
} catch (error) {
console.error(error);
process.exitCode = 1;
}
};
};

const { getReleaseChangelog } = require('./commands/changelog');

program
.command('release-plugin-changelog')
.alias('changelog')
.option('-m, --milestone <milestone>', 'Milestone')
.option('-t, --token <token>', 'GitHub token')
.option(
'-u, --unreleased',
"Only include PRs that haven't been included in a release yet"
)
.description('Generates a changelog from merged Pull Requests')
.action(catchException(getReleaseChangelog));

program.parse(process.argv);
Loading

0 comments on commit 082eabe

Please sign in to comment.