mirror of
https://github.com/darksaid98/auto-changelog.git
synced 2026-12-02 14:38:47 +00:00
feat: Add exclude & allow-unknown options
This commit is contained in:
6 files changed
+48
-5
No files matched your search
+8
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user