@ondrejbelza/semantic-release-jira 1.9.1 → 1.9.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/dist/success.js +18 -2
- package/package.json +1 -1
package/dist/success.js
CHANGED
|
@@ -77,8 +77,24 @@ async function getContributions(c, ticketPrefixes, jiraHost, commits, logger) {
|
|
|
77
77
|
found = true;
|
|
78
78
|
for (const match of matches) {
|
|
79
79
|
logger.info(`Found matching ticket it commit ${match} in ${commit.commit.short}`);
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
try {
|
|
81
|
+
const issue = await getIssueMetadata(c, match, jiraHost, logger);
|
|
82
|
+
tickets.add(issue);
|
|
83
|
+
}
|
|
84
|
+
catch (err) {
|
|
85
|
+
const allowedMessages = ["Issue does not exist"];
|
|
86
|
+
const errorMessages = err?.response?.data?.errorMessages || [];
|
|
87
|
+
let isAllowed = false;
|
|
88
|
+
for (const allowedMessage of allowedMessages) {
|
|
89
|
+
if (errorMessages.includes(allowedMessage)) {
|
|
90
|
+
isAllowed = true;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (!isAllowed) {
|
|
94
|
+
throw err;
|
|
95
|
+
}
|
|
96
|
+
found = false;
|
|
97
|
+
}
|
|
82
98
|
}
|
|
83
99
|
}
|
|
84
100
|
}
|
package/package.json
CHANGED