@ondrejbelza/semantic-release-jira 1.4.1 → 1.4.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.
Files changed (2) hide show
  1. package/dist/success.js +5 -4
  2. package/package.json +1 -1
package/dist/success.js CHANGED
@@ -57,9 +57,9 @@ function getMentionedTickets(ticketPrefix, commits, logger) {
57
57
  }
58
58
  return [...tickets];
59
59
  }
60
- async function findOrCreateVersion(c, projectKey, newVersionName, newVersionDescription, logger) {
60
+ async function findOrCreateVersion(c, projectID, newVersionName, newVersionDescription, logger) {
61
61
  const versions = await c.projectVersions.getProjectVersions({
62
- projectIdOrKey: projectKey,
62
+ projectIdOrKey: projectID,
63
63
  });
64
64
  for (const v of versions) {
65
65
  if (v.name === newVersionName) {
@@ -71,9 +71,10 @@ async function findOrCreateVersion(c, projectKey, newVersionName, newVersionDesc
71
71
  const version = await c.projectVersions.createVersion({
72
72
  name: newVersionName,
73
73
  description: newVersionDescription,
74
- projectId: projectKey,
74
+ projectId: projectID,
75
75
  released: true,
76
76
  releaseDate: new Date().toISOString(),
77
+ archived: false,
77
78
  });
78
79
  return version;
79
80
  }
@@ -131,7 +132,7 @@ async function success(config, context) {
131
132
  logger.info(`using jira description '${consts_1.DEFAULT_RELEASE_DESCRIPTION_TEMPLATE}'`);
132
133
  const c = (0, jira_client_1.CreateJiraClient)(logger, jiraHost, env.JIRA_EMAIL, env.JIRA_TOKEN);
133
134
  const project = await c.projects.getProject({ projectIdOrKey: projectKey });
134
- const version = await findOrCreateVersion(c, projectKey, newVersionName, newVersionDescription, logger);
135
+ const version = await findOrCreateVersion(c, Number(project.id), newVersionName, newVersionDescription, logger);
135
136
  const concurrentLimit = (0, p_limit_1.default)(10);
136
137
  const edits = [];
137
138
  for (const ticket of tickets) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ondrejbelza/semantic-release-jira",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "semantic release jira releases plugin",
5
5
  "homepage": "https://github.com/mailstepcz/semantic-release-jira#readme",
6
6
  "bugs": {