mirror of
https://github.com/darksaid98/auto-changelog.git
synced 2026-12-02 22:16:06 +00:00
feat: Add include-compare input
This commit is contained in:
8 files changed
+36
-5
No files matched your search
@@ -47,5 +47,6 @@ export interface ActionInputsI {
|
||||
commitTypes: TypesI;
|
||||
defaultCommitType: string;
|
||||
releaseName: string;
|
||||
includeCompare: boolean;
|
||||
semver: boolean;
|
||||
}
|
||||
+9
-1
@@ -11,6 +11,7 @@ export async function getInputs(): Promise<ActionInputsI> {
|
||||
const commitTypes = YAML.parse(getInput("commit-types", { required: true }));
|
||||
const defaultCommitType = getInput("default-commit-type", { required: true });
|
||||
const releaseName = getInput("release-name", { required: true });
|
||||
const includeCompare = getBooleanInput("include-compare", { required: true });
|
||||
const semver = getBooleanInput("semver", { required: true });
|
||||
|
||||
return Joi.object<ActionInputsI, true>()
|
||||
@@ -20,7 +21,14 @@ export async function getInputs(): Promise<ActionInputsI> {
|
||||
.required(),
|
||||
defaultCommitType: Joi.string().required(),
|
||||
releaseName: Joi.string().required(),
|
||||
includeCompare: Joi.boolean().required(),
|
||||
semver: Joi.boolean().required(),
|
||||
})
|
||||
.validateAsync({ commitTypes, defaultCommitType, releaseName, semver });
|
||||
.validateAsync({
|
||||
commitTypes,
|
||||
defaultCommitType,
|
||||
releaseName,
|
||||
includeCompare,
|
||||
semver,
|
||||
});
|
||||
}
|
||||
+1
-1
@@ -48,7 +48,7 @@ async function run() {
|
||||
inputs,
|
||||
});
|
||||
|
||||
if (tagName != null) {
|
||||
if (inputs.includeCompare && tagName != null) {
|
||||
changelog += `\n\n**Full Changelog**: https://github.com/${owner}/${repo}/compare/${tagName}...${inputs.releaseName}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user