semantic-release-jira-releases-modern
semantic-release plugin to publish a jira release.

verifyConditions | Validate the config options and check for a JIRA_USER,JIRA_TOKEN in the environment |
sucess | Find all tickets from commits and add them to a new release on JIRA |
Install
$ npm install --save-dev semantic-release-jira-releases-modern
$ yarn add --dev semantic-release-jira-releases-modern
Configuration
The plugin should be added to your config
{
"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 {
jiraHost: string;
ticketPrefixes?: string[];
ticketRegex?: string;
projectId: string;
releaseNameTemplate?: string;
releaseDescriptionTemplate?: string;
networkConcurrency?: number;
released?: boolean;
setReleaseDate?: boolean;
disableBranchFiltering?: boolean;
}
What is searched for the ticket prefix?
We search commit bodies for a commit number and we look at the branch name as well. This means that a branch named TEST-345-anything with a commit feat: thing \n TEST-123 will add a release named after the new version and link both TEST-123 and TEST-345 to it. This is done as a lot of the github/gitlab integrations support the branch naming to match to tickets so we want to broadly reproduce these features to reduce developer cognitive overload. Can be disabled via disableBranchFiltering.