Skip to content

API 参考 / @142vip/changelog / GitCommitAPI

变量: GitCommitAPI ​

const GitCommitAPI: object

定义于: changelog/src/core/git-commit.api.ts:225

类型声明 ​

getGitCommitDiff() ​

getGitCommitDiff: (options) => Promise<GitCommitRaw[]>

获取不同tag之间的commit记录

参数 ​

options ​

GitCommitDiffOptions

返回 ​

Promise<GitCommitRaw[]>

parseCommitsToMarkdownStr() ​

parseCommitsToMarkdownStr: (commits, options) => Promise<string>

生成Markdown文档记录的每行记录

参数 ​

commits ​

Commit[]

options ​
baseUrl ​

string

capitalize ​

boolean

emoji ​

boolean

from ​

string

group? ​

boolean | "multiple"

name ​

string

repo ​

string

scopeMap ​

Record<string, string>

scopeName? ​

string

titles ​

{ breakingChanges?: string; }

titles.breakingChanges? ​

string

to ​

string

types ​

Record<string, { title: string; }>

返回 ​

Promise<string>

parseGitCommits() ​

parseGitCommits: (commits, scopeMap) => GitCommitRecord[]

解析所有Commit信息

参数 ​

commits ​

GitCommitRaw[]

scopeMap ​

Record<string, string>

返回 ​

GitCommitRecord[]