-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: generate changelog based on Conventional Commits
- Loading branch information
1 parent
66f1dee
commit 3413c6c
Showing
6 changed files
with
521 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { IConventionalCommit } from "@dev-build-deploy/commit-it"; | ||
import { SemVer } from "./semver"; | ||
type semVerBumpTypes = "major" | "minor" | "patch" | "none"; | ||
/** | ||
* Exclude configuration | ||
* @interface IExclude | ||
* @member bump Exclude commits from the changelog based on the bump type | ||
* @member types Exclude commits from the changelog based on the type | ||
* @member scopes Exclude commits from the changelog based on the scope | ||
*/ | ||
interface IExclude { | ||
bump?: semVerBumpTypes[]; | ||
types?: string[]; | ||
scopes?: string[]; | ||
} | ||
/** | ||
* Release configuration | ||
* @interface IReleaseConfiguration | ||
* @member changelog Changelog configuration | ||
* @member changelog.exclude Exclude commits from the changelog | ||
* @member changelog.categories Categories to use in the changelog | ||
* @member changelog.categories.title Title of the category | ||
* @member changelog.categories.bump Bump type for the category | ||
* @member changelog.categories.types Types to include in the category | ||
* @member changelog.categories.scopes Scopes to include in the category | ||
* @member changelog.categories.exclude Exclude commits from the category | ||
*/ | ||
interface IReleaseConfiguration { | ||
changelog?: { | ||
exclude?: IExclude; | ||
categories?: { | ||
title: string; | ||
bump?: semVerBumpTypes[]; | ||
types?: string[]; | ||
scopes?: string[]; | ||
exclude?: IExclude; | ||
}[]; | ||
}; | ||
} | ||
/** | ||
* Get the configuration for the Changelog | ||
* @returns | ||
*/ | ||
export declare function getConfiguration(): IReleaseConfiguration; | ||
/** | ||
* Generate the changelog based on the provided version and commits | ||
* @param version SemVer version of the Release | ||
* @param commits Conventional Commits part of the Changelog | ||
* @returns Changelog in Markdown format | ||
*/ | ||
export declare function generateChangelog(version: SemVer, commits: IConventionalCommit[]): string; | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.