Skip to content

Commit cd8cbe1

Browse files
committed
feat(generate-notes): don't use release-notes-generator manually
BREAKING CHANGE: release-notes-generator should now be defined in the configuration file before semantic-release-jira-notes
1 parent 3556d0d commit cd8cbe1

File tree

4 files changed

+19
-780
lines changed

4 files changed

+19
-780
lines changed

README.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# semantic-release-jira-notes
22

3+
[![npm latest version](https://img.shields.io/npm/v/semantic-release-jira-notes/latest.svg)](https://www.npmjs.com/package/semantic-release-jira-notes)
4+
35
[**semantic-release**](https://github.com/semantic-release/semantic-release) plugin to add links to
46
JIRA issues in the release notes.
57

6-
[![npm latest version](https://img.shields.io/npm/v/semantic-release-jira-notes/latest.svg)](https://www.npmjs.com/package/semantic-release-jira-notes)
8+
For each JIRA issue detected in the release notes, it will add a link that brings directly to this issue on JIRA.
79

810

911
| Step | Description |
@@ -14,22 +16,27 @@ JIRA issues in the release notes.
1416

1517
## Usage
1618

17-
First, install the plugin.
19+
### Installation
1820

1921
```bash
2022
$ npm install --save-dev semantic-release-jira-notes
2123
$ yarn add --dev semantic-release-jira-notes
2224
```
2325

26+
### Inputs
2427

25-
## Configuration
28+
| Name | Required | Description |
29+
| -------------- | :------: | ---------------------------------------------------------------------- |
30+
| jiraHost || Your JIRA host domain name |
31+
| ticketPrefixes || Ticket prefixes to match. If not provided, match all tickets prefixes. |
2632

27-
The plugin should then be added to your config file.
33+
### Configuration
2834

2935
```json
3036
{
3137
"plugins": [
3238
"@semantic-release/commit-analyzer",
39+
"@semantic-release/release-notes-generator",
3340
["semantic-release-jira-notes", {
3441
"jiraHost": "iamludal.atlassian.net",
3542
"ticketPrefixes": ["ATP", "OMS"]
@@ -40,13 +47,6 @@ The plugin should then be added to your config file.
4047
}
4148
```
4249

43-
**Note:** you don't need to use `@semantic-release/release-notes-generator` as it already uses
44-
it under the hood.
50+
> **Note:** don't forget to use `@semantic-release/release-notes-generator` before, as it will generate
51+
the release notes needed for `semantic-release-jira-notes`.
4552

46-
47-
### Inputs
48-
49-
| Name | Required | Description |
50-
| -------------- | :------: | ---------------------------------------------------------------------- |
51-
| jiraHost || Your JIRA host domain name |
52-
| ticketPrefixes || Ticket prefixes to match. If not provided, match all tickets prefixes. |

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
],
1616
"dependencies": {
1717
"@semantic-release/error": "2.2.0",
18-
"@semantic-release/release-notes-generator": "^10.0.3",
1918
"aggregate-error": "^4.0.1"
2019
}
2120
}

src/lib/generate-notes.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
const releaseNotesGenerator = require("@semantic-release/release-notes-generator");
21
const { INPUTS, ISSUE_REGEX } = require("./constants");
32

4-
module.exports = async (pluginConfig, context) => {
3+
module.exports = async pluginConfig => {
54
const ticketPrefixes = pluginConfig[INPUTS.ticketPrefixes];
65
const jiraHost = pluginConfig[INPUTS.jiraHost];
7-
const notes = await releaseNotesGenerator.generateNotes(pluginConfig, context);
86

97
let issueRegex;
108

0 commit comments

Comments
 (0)