@credal/actions 0.2.144 → 0.2.145
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.
|
@@ -10,10 +10,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { axiosClient } from "../../util/axiosClient.js";
|
|
11
11
|
// https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-get
|
|
12
12
|
const getJiraTicketDetails = (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, authParams, }) {
|
|
13
|
-
const { authToken, cloudId } = authParams;
|
|
13
|
+
const { authToken, cloudId, baseUrl } = authParams;
|
|
14
14
|
const { issueId } = params;
|
|
15
|
-
if (!cloudId || !authToken) {
|
|
16
|
-
throw new Error("Valid Cloud ID and auth token are required to
|
|
15
|
+
if (!cloudId || !authToken || !baseUrl) {
|
|
16
|
+
throw new Error("Valid Cloud ID, base URL, and auth token are required to get Jira ticket details");
|
|
17
17
|
}
|
|
18
18
|
const apiUrl = `https://api.atlassian.com/ex/jira/${cloudId}/rest/api/3/issue/${issueId}`;
|
|
19
19
|
try {
|
|
@@ -28,7 +28,7 @@ const getJiraTicketDetails = (_a) => __awaiter(void 0, [_a], void 0, function* (
|
|
|
28
28
|
results: [
|
|
29
29
|
{
|
|
30
30
|
name: response.data.key,
|
|
31
|
-
url: response.data.
|
|
31
|
+
url: `${baseUrl}/browse/${response.data.key}`,
|
|
32
32
|
contents: response.data,
|
|
33
33
|
},
|
|
34
34
|
],
|