@sentry/junior-github 0.124.0 → 0.124.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/index.js +9 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -119,18 +119,18 @@ function sentryConversationUrl(conversationId) {
|
|
|
119
119
|
function githubConversationFooter(conversationId, dashboardUrl) {
|
|
120
120
|
const id = nonEmptyString(conversationId, "conversationId");
|
|
121
121
|
const normalizedDashboardUrl = dashboardUrl?.trim();
|
|
122
|
-
const
|
|
123
|
-
|
|
122
|
+
const sentryUrl = sentryConversationUrl(id);
|
|
123
|
+
const sessionLinks = normalizedDashboardUrl ? `[View Junior Session](${normalizedDashboardUrl})${sentryUrl ? ` [Sentry](${sentryUrl})` : ""}` : sentryUrl ? `[View Junior Session in Sentry](${sentryUrl})` : void 0;
|
|
124
|
+
if (!sessionLinks) {
|
|
124
125
|
return void 0;
|
|
125
126
|
}
|
|
126
|
-
const label = normalizedDashboardUrl ? "View Junior Session" : "View Junior Session in Sentry";
|
|
127
127
|
const conversationMarker = `<!-- ${GITHUB_CONVERSATION_ID_MARKER}${encodeURIComponent(id)} -->`;
|
|
128
128
|
return `${GITHUB_SESSION_FOOTER_START}
|
|
129
129
|
${conversationMarker}
|
|
130
130
|
|
|
131
131
|
--
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
${sessionLinks}
|
|
134
134
|
|
|
135
135
|
${GITHUB_SESSION_FOOTER_END}`;
|
|
136
136
|
}
|
|
@@ -382,7 +382,7 @@ function isDefinitiveGitHubIssueCreateRejection(error) {
|
|
|
382
382
|
}
|
|
383
383
|
return [400, 401, 404, 410, 422].includes(error.status);
|
|
384
384
|
}
|
|
385
|
-
function createGitHubIssueRequest(conversationId, input, actor) {
|
|
385
|
+
function createGitHubIssueRequest(conversationId, input, actor, dashboardUrl) {
|
|
386
386
|
const repo = parseRepo(input.repo);
|
|
387
387
|
const labels = input.labels?.map(
|
|
388
388
|
(label) => nonEmptyString2(label, "labels entry")
|
|
@@ -391,7 +391,8 @@ function createGitHubIssueRequest(conversationId, input, actor) {
|
|
|
391
391
|
title: nonEmptyString2(input.title, "title"),
|
|
392
392
|
body: appendGitHubFooter(
|
|
393
393
|
appendGitHubRequesterAttribution(input.body ?? "", actor),
|
|
394
|
-
conversationId
|
|
394
|
+
conversationId,
|
|
395
|
+
dashboardUrl
|
|
395
396
|
),
|
|
396
397
|
...labels?.length ? { labels } : {}
|
|
397
398
|
};
|
|
@@ -488,7 +489,8 @@ function createGitHubIssueTool(ctx) {
|
|
|
488
489
|
const request = createGitHubIssueRequest(
|
|
489
490
|
conversationId,
|
|
490
491
|
parsedInput,
|
|
491
|
-
ctx.actor
|
|
492
|
+
ctx.actor,
|
|
493
|
+
ctx.slack?.conversationLink?.url
|
|
492
494
|
);
|
|
493
495
|
const pendingState = {
|
|
494
496
|
status: "pending",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior-github",
|
|
3
|
-
"version": "0.124.
|
|
3
|
+
"version": "0.124.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@sinclair/typebox": "^0.34.49",
|
|
32
32
|
"drizzle-orm": "^0.45.2",
|
|
33
33
|
"zod": "^4.4.3",
|
|
34
|
-
"@sentry/junior-plugin-api": "0.124.
|
|
34
|
+
"@sentry/junior-plugin-api": "0.124.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^25.9.1",
|