语义-放行-jira-放行-现代
语义释放 发布 jira 发行的插件 .
| 步骤 | 说明 |
|---|---|
verifyConditions | 验证配置选项并检查 JIRA_USER,JIRA_TOKEN 环境状况 |
sucess | 找到所有承诺的门票 并添加到JIRA的新释放中 |
安装
$ npm install --save-dev semantic-release-jira-releases-modern
$ yarn add --dev semantic-release-jira-releases-modern
配置
插件应该添加到您的配置中
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/git",
["semantic-release-jira-releases-modern", {
"projectId": "UH",
"releaseNameTemplate": "Test v${version}",
"jiraHost": "your-company.atlassian.net",
"ticketPrefixes": [ "TEST", "UH"],
"ticketRegex": "[a-zA-Z]{3,5}-\\d{3,5}"
}]
]
}
Please note that `ticketRegex` cannot be used together with `ticketPrefixes`.
export interface Config {
/**
* A domain of a jira instance ie: `your-company.atlassian.net`
*/
jiraHost: string;
/**
* A list of prefixes to match when looking for tickets in commits. Cannot be used together with ticketRegex.
*
* ie. ['TEST'] would match `TEST-123` and `TEST-456`
*/
ticketPrefixes?: string[];
/**
* A unescaped regex to match tickets in commits (without slashes). Cannot be used together with ticketPrefixes.
*
* ie. [a-zA-Z]{4}-\d{3,5} would match any ticket with 3 letters a dash and 3 to 5 numbers, such as `TEST-456`, `TEST-5643` and `TEST-56432`
*/
ticketRegex?: string;
/**
* The id or key for the project releases will be created in
*/
projectId: string;
/**
* A lodash template with a single `version` variable
* defaults to `v${version}` which results in a version that is named like `v1.0.0`
* ex: `Semantic Release v${version}` results in `Semantic Release v1.0.0`
*
* @default `v${version}`
*/
releaseNameTemplate?: string;
/**
* A lodash template for the release.description field
*
* template variables:
* version: the sem-ver version ex.: 1.2.3
* notes: The full release notes: This may be very large
* Only use it if you have very small releases
*
* @default `Automated release with semantic-release-jira-releases-modern`
*/
releaseDescriptionTemplate?: string;
/**
* The number of maximum parallel network calls, default 10
*/
networkConcurrency?: number;
/**
* indicates if a new release created in jira should be set as released
*/
released?: boolean;
/**
* include the release date when creating a release in jira
*/
setReleaseDate?: boolean;
/**
* ignore ticket numbers in the branch name
*/
disableBranchFiltering?: boolean;
}
车票前缀是什么?
我们搜索承诺机构 寻找承诺数字,我们也看看分支名称。 这意味着一个分支命名为 TEST-345-anything 与犯罪 feat: thing \n TEST-123 将添加以新版本命名的版本,并将两者链接 TEST-123 财务报告和审定财务报表 TEST-345 对它。 这样做是因为很多github/gitlab的集成支持分支命名与门票相匹配,所以我们希望广泛复制这些功能来减少开发者认知超载. 可以通过 disableBranchFiltering。 。 。 .