Skip to content

Commit

Permalink
fix(generate-notes): use release-notes-generator plugin
Browse files Browse the repository at this point in the history
Otherwise, both release notes are concatenated together.

BREAKING CHANGE: users should now remove release-notes-generator
from their plugin list.
  • Loading branch information
iamludal committed Jul 1, 2022
1 parent 840fa5b commit e7c0770
Show file tree
Hide file tree
Showing 4 changed files with 763 additions and 5 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ $ yarn add --dev semantic-release-jira-notes
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["semantic-release-jira-notes", {
"jiraHost": "iamludal.atlassian.net",
"ticketPrefixes": ["ATP", "OMS"]
Expand All @@ -47,6 +46,4 @@ $ yarn add --dev semantic-release-jira-notes
}
```

> **Note:** don't forget to use `@semantic-release/release-notes-generator` before, as it will generate
the release notes needed for `semantic-release-jira-notes`.

> **Note:** you don't need to use `@semantic-release/release-notes-generator`.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
],
"dependencies": {
"@semantic-release/error": "2.2.0",
"@semantic-release/release-notes-generator": "^10.0.3",
"aggregate-error": "^4.0.1"
}
}
4 changes: 3 additions & 1 deletion src/lib/generate-notes.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
const { INPUTS, ISSUE_REGEX } = require("./constants");
const { generateNotes } = require("@semantic-release/release-notes-generator");

module.exports = async (pluginConfig, { nextRelease: { notes } }) => {
module.exports = async (pluginConfig, context) => {
const ticketPrefixes = pluginConfig[INPUTS.ticketPrefixes];
const jiraHost = pluginConfig[INPUTS.jiraHost];
const notes = await generateNotes(pluginConfig, context);

let issueRegex;

Expand Down
Loading

0 comments on commit e7c0770

Please sign in to comment.