feat: Add exclude & allow-unknown options

This commit is contained in:
Ardalan Amini committed 2020-09-28 16:16:03 +03:30
1 parent 22d355a83e
commit ddb4b06bb9
6 files changed
+48 -5

No files matched your search

+8 -1
View File
@@ -5,6 +5,9 @@ import Changelog from "generate-changelog";
async function run() {
try {
const token = getInput("token", { required: true });
const exclude = getInput("exclude", { required: false }).split(",");
const allowUnknown =
getInput("allow-unknown", { required: false }) === "true";
const octokit = getOctokit(token);
const {
repo: { owner, repo },
@@ -25,11 +28,15 @@ async function run() {
} else tag = tags[0].name;
}
const changelog = await Changelog.generate({
let changelog = await Changelog.generate({
repoUrl: `https://github.com/${owner}/${repo}`,
tag,
exclude,
allowUnknown,
});
changelog = changelog.replace(/^#+ +(\d)/, "#### v$1");
info(changelog);
setOutput("changelog", changelog);