@ondrejbelza/semantic-release-jira 1.7.0 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,88 @@
1
- # semantic-release-jira
1
+ # semantic-release-jira plugin
2
+
3
+ Semantic release jira plugin hooks to semantic release and automatically creates releases in jira and links issues to this release.
4
+
5
+ ## Used hooks
6
+
7
+ | Hook | Description |
8
+ | ---------------- | -------------------------------------------------------------------------------------- |
9
+ | verifyConditions | Tries to get project info, throws an exception, when plugin is not configured properly |
10
+ | sucess | creates new jira release and link issue to it |
11
+
12
+ ## Install step
13
+
14
+ ```bash
15
+ $ npm install --save-dev @ondrejbelza/semantic-release-jira
16
+ $ yarn add --dev @ondrejbelza/semantic-release-jira
17
+ ```
18
+
19
+ ## Configuration
20
+
21
+ ### Required CI env variables
22
+
23
+ | Value | Description |
24
+ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25
+ | JIRA_TOKEN | user token that is used for all jira API calls. [Guide How to generate token](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/). |
26
+ | JIRA_EMAIL | email of user which generated the token |
27
+
28
+ #### Required jira permissions
29
+
30
+ user must have following permissions, otherwise this plugin will not work properly
31
+
32
+ - get project
33
+ - get issue
34
+ - modify issue
35
+ - create release
36
+
37
+ ### Plugin Configuration
38
+
39
+ ```json
40
+ {
41
+ "plugins": [
42
+ "@semantic-release/commit-analyzer",
43
+ "@semantic-release/release-notes-generator",
44
+ "@semantic-release/git",
45
+ [
46
+ "ondrejbelza/semantic-release-jira",
47
+ {
48
+ "projectId": "MAWI",
49
+ "releaseNameTemplate": "Test v${version}",
50
+ "jiraHost": "maisltep.atlassian.net",
51
+ "ticketPrefixe": "MAWI"
52
+ }
53
+ ]
54
+ ]
55
+ }
56
+ ```
57
+
58
+ ```ts
59
+ interface Config {
60
+ /**
61
+ * A domain of a jira instance ie: `mailstep.atlasian.net`
62
+ */
63
+ jiraHost: string;
64
+
65
+ /**
66
+ * A prefixe to match when looking for tickets in commits.
67
+ *
68
+ * ie. 'TEST' would match `TEST-123` and `TEST-456`
69
+ */
70
+ ticketPrefix: string;
71
+
72
+ /**
73
+ * The id or key for the project releases will be created in
74
+ */
75
+ projectId: string;
76
+
77
+ /**
78
+ * A lodash template with a single `version` variable
79
+ * defaults to `v${version}` which results in a version that is named like `v1.0.0`
80
+ * ex: `Semantic Release v${version}` results in `Semantic Release v1.0.0`
81
+ *
82
+ * @default `v${version}`
83
+ */
84
+ releaseNameTemplate?: string;
85
+ }
86
+ ```
2
87
 
3
88
  semantic release jira releases plugin.
package/dist/success.js CHANGED
@@ -107,7 +107,7 @@ async function findOrCreateVersion(c, projectIdOrKey, newVersionName, newVersion
107
107
  }
108
108
  }
109
109
  async function editIssueFixVersions(c, ticket, versionId, logger) {
110
- logger.info(`Adding issue '${ticket}' to a release '${versionId}'`);
110
+ logger.info(`Adding issue '${ticket.key}' to a release '${versionId}'`);
111
111
  c.issues
112
112
  .editIssue({
113
113
  issueIdOrKey: ticket.key,
@@ -140,7 +140,7 @@ async function editIssueFixVersions(c, ticket, versionId, logger) {
140
140
  }
141
141
  })
142
142
  .then(() => {
143
- logger.complete(`Issue '${ticket}' was successfully added to a release.`);
143
+ logger.complete(`Issue '${ticket.key}' was successfully added to a release.`);
144
144
  });
145
145
  }
146
146
  async function success(config, context) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ondrejbelza/semantic-release-jira",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "semantic release jira releases plugin",
5
5
  "homepage": "https://github.com/mailstepcz/semantic-release-jira#readme",
6
6
  "bugs": {
@@ -44,6 +44,7 @@
44
44
  "@types/node": "^25.0.3",
45
45
  "@types/semantic-release__error": "^3.0.3",
46
46
  "@types/signale": "^1.4.7",
47
+ "conventional-changelog-conventionalcommits": "^9.1.0",
47
48
  "dotenv": "^17.2.3",
48
49
  "dotenv-safe": "^9.1.0",
49
50
  "typescript": "^5.9.3"