mirror of
https://github.com/darksaid98/auto-changelog.git
synced 2026-12-03 06:28:52 +00:00
breaking: Remove the exclude input
This commit is contained in:
8 files changed
+3
-21
No files matched your search
+1
-2
@@ -1,7 +1,7 @@
|
||||
import { COMMIT_REGEX, InputI, LogsI, PR_REGEX, TYPES } from "./constants";
|
||||
|
||||
export async function generate(input: InputI): Promise<string> {
|
||||
const { octokit, exclude, owner, repo, sha, tagRef } = input;
|
||||
const { octokit, owner, repo, sha, tagRef } = input;
|
||||
|
||||
const repoUrl = `https://github.com/${owner}/${repo}`;
|
||||
const commits: LogsI = {};
|
||||
@@ -51,7 +51,6 @@ export async function generate(input: InputI): Promise<string> {
|
||||
}
|
||||
|
||||
return Object.values(TYPES)
|
||||
.filter((type) => !exclude.includes(type))
|
||||
.reduce((changelog, type) => {
|
||||
const typeGroup = commits[type];
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ export interface LogI {
|
||||
|
||||
export interface InputI {
|
||||
octokit: InstanceType<typeof GitHub>;
|
||||
exclude: string[];
|
||||
owner: string;
|
||||
repo: string;
|
||||
sha: string;
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import { getInput, info, setFailed, setOutput } from "@actions/core";
|
||||
import { context, getOctokit } from "@actions/github";
|
||||
import { generate } from "./changelog";
|
||||
import { TYPES } from "./constants";
|
||||
|
||||
async function run() {
|
||||
const token = getInput("token", { required: true });
|
||||
const exclude = getInput("exclude", { required: false })
|
||||
.split(",")
|
||||
.map((type) => TYPES[type] ?? type);
|
||||
|
||||
const octokit = getOctokit(token);
|
||||
|
||||
@@ -32,7 +28,6 @@ async function run() {
|
||||
|
||||
const changelog = await generate({
|
||||
octokit,
|
||||
exclude,
|
||||
owner,
|
||||
repo,
|
||||
sha,
|
||||
|
||||
Reference in new issue
Block a user