@sentry/junior-github 0.221.1 → 0.223.0
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/annotations.d.ts +17 -1
- package/dist/index.js +140 -82
- package/dist/tools/clone-repository.d.ts +24 -0
- package/dist/tools/create-issue.d.ts +24 -0
- package/dist/tools/create-pull-request.d.ts +24 -0
- package/dist/tools/get-deployment.d.ts +24 -0
- package/dist/tools/get-pull-request.d.ts +24 -0
- package/dist/tools/get-release.d.ts +24 -0
- package/dist/tools/get-repository.d.ts +24 -0
- package/dist/tools/resolve-pull-request-review-thread.d.ts +24 -0
- package/dist/tools/submit-pull-request-review.d.ts +24 -0
- package/dist/tools/update-issue.d.ts +24 -0
- package/dist/tools/update-pull-request-feedback.d.ts +24 -0
- package/dist/tools/update-pull-request.d.ts +24 -0
- package/package.json +2 -2
package/dist/annotations.d.ts
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
-
import type { ConversationAnnotation, ConversationSidebarAnnotation } from "@sentry/junior-plugin-api";
|
|
1
|
+
import type { ConversationAnnotation, ConversationSidebarAnnotation, ObjectAnnotation, PluginAnnotations } from "@sentry/junior-plugin-api";
|
|
2
2
|
/** Return GitHub annotations for a conversation row, newest first. */
|
|
3
3
|
export declare function githubSidebarAnnotations(annotations: ConversationAnnotation[]): ConversationSidebarAnnotation[];
|
|
4
|
+
/** Build the annotation returned by GitHub create and update tools. */
|
|
5
|
+
export declare function githubObjectAnnotation(input: {
|
|
6
|
+
repo: string;
|
|
7
|
+
number: number;
|
|
8
|
+
title: string;
|
|
9
|
+
url: string;
|
|
10
|
+
objectType: "task" | "code_change";
|
|
11
|
+
status: string;
|
|
12
|
+
}): ObjectAnnotation;
|
|
13
|
+
/** Refresh an existing object's status without selecting a card for delivery. */
|
|
14
|
+
export declare function updateGitHubAnnotation(store: PluginAnnotations, input: {
|
|
15
|
+
repo: string;
|
|
16
|
+
number: number;
|
|
17
|
+
objectType: "task" | "code_change";
|
|
18
|
+
status: "merged" | "closed";
|
|
19
|
+
}): Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -237,6 +237,84 @@ function createGitHubCloneRepositoryTool(ctx) {
|
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
+
// src/annotations.ts
|
|
241
|
+
var STATUS_ICON = {
|
|
242
|
+
warning: "triangle-alert",
|
|
243
|
+
open: "circle-dot",
|
|
244
|
+
draft: "circle-dashed",
|
|
245
|
+
merged: "git-merge",
|
|
246
|
+
closed: "circle-x"
|
|
247
|
+
};
|
|
248
|
+
function isPullRequestUrl(url) {
|
|
249
|
+
try {
|
|
250
|
+
return /^\/[^/]+\/[^/]+\/pull\/\d+(?:\/|$)/.test(new URL(url).pathname);
|
|
251
|
+
} catch {
|
|
252
|
+
return false;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
function sidebarIconForStatus(status, url) {
|
|
256
|
+
if (status === "open" && isPullRequestUrl(url)) return "git-pull-request";
|
|
257
|
+
return STATUS_ICON[status];
|
|
258
|
+
}
|
|
259
|
+
function repositoryName(annotation) {
|
|
260
|
+
try {
|
|
261
|
+
const [, , repo] = new URL(annotation.url ?? "").pathname.split("/");
|
|
262
|
+
return repo || void 0;
|
|
263
|
+
} catch {
|
|
264
|
+
return void 0;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
function githubSidebarAnnotations(annotations) {
|
|
268
|
+
return annotations.flatMap((annotation) => {
|
|
269
|
+
const status = annotation.status;
|
|
270
|
+
const label = repositoryName(annotation);
|
|
271
|
+
return status && status in STATUS_ICON && label ? [
|
|
272
|
+
{
|
|
273
|
+
annotation: {
|
|
274
|
+
icon: sidebarIconForStatus(status, annotation.url ?? ""),
|
|
275
|
+
key: annotation.key,
|
|
276
|
+
label
|
|
277
|
+
},
|
|
278
|
+
updatedAt: annotation.updatedAt
|
|
279
|
+
}
|
|
280
|
+
] : [];
|
|
281
|
+
}).sort((left, right) => right.updatedAt.localeCompare(left.updatedAt)).map(({ annotation }) => annotation);
|
|
282
|
+
}
|
|
283
|
+
function githubObjectAnnotation(input) {
|
|
284
|
+
return {
|
|
285
|
+
kind: "object",
|
|
286
|
+
key: `${input.repo.toLowerCase()}#${input.number}`,
|
|
287
|
+
label: `${input.repo}#${input.number}`,
|
|
288
|
+
title: input.title.slice(0, 512),
|
|
289
|
+
url: input.url,
|
|
290
|
+
objectType: input.objectType,
|
|
291
|
+
status: input.status
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
async function updateGitHubAnnotation(store, input) {
|
|
295
|
+
const key = `${input.repo.toLowerCase()}#${input.number}`;
|
|
296
|
+
const current = (await store.list()).find(
|
|
297
|
+
(annotation) => annotation.key === key
|
|
298
|
+
);
|
|
299
|
+
if (current?.kind === "object") {
|
|
300
|
+
const {
|
|
301
|
+
plugin: _plugin,
|
|
302
|
+
createdAt: _createdAt,
|
|
303
|
+
updatedAt: _updatedAt,
|
|
304
|
+
...annotation
|
|
305
|
+
} = current;
|
|
306
|
+
await store.upsert({ ...annotation, status: input.status });
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
await store.upsert({
|
|
310
|
+
kind: "resource_link",
|
|
311
|
+
key,
|
|
312
|
+
label: `${input.repo}#${input.number}`,
|
|
313
|
+
url: `https://github.com/${input.repo}/${input.objectType === "code_change" ? "pull" : "issues"}/${input.number}`,
|
|
314
|
+
status: input.status
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
|
|
240
318
|
// src/tools/create-issue.ts
|
|
241
319
|
import {
|
|
242
320
|
definePluginTool as definePluginTool2,
|
|
@@ -529,6 +607,16 @@ function gitHubIssueToolResult(input, result, canSubscribe) {
|
|
|
529
607
|
}) : void 0;
|
|
530
608
|
const data = { ...result, ...subscribable ? { subscribable } : void 0 };
|
|
531
609
|
return {
|
|
610
|
+
objectAnnotations: [
|
|
611
|
+
githubObjectAnnotation({
|
|
612
|
+
repo: input.repo,
|
|
613
|
+
number: result.number,
|
|
614
|
+
title: input.title,
|
|
615
|
+
url: result.url,
|
|
616
|
+
objectType: "task",
|
|
617
|
+
status: "open"
|
|
618
|
+
})
|
|
619
|
+
],
|
|
532
620
|
target: "createIssue",
|
|
533
621
|
...data
|
|
534
622
|
};
|
|
@@ -659,16 +747,6 @@ async function createGitHubIssue(ctx, request) {
|
|
|
659
747
|
url: issue.html_url
|
|
660
748
|
};
|
|
661
749
|
}
|
|
662
|
-
async function annotateIssue(ctx, input, result) {
|
|
663
|
-
const repo = parseRepo2(input.repo);
|
|
664
|
-
await ctx.annotations?.upsert({
|
|
665
|
-
kind: "resource_link",
|
|
666
|
-
key: `${repo.owner.toLowerCase()}/${repo.name.toLowerCase()}#${result.number}`,
|
|
667
|
-
label: `${repo.owner}/${repo.name}#${result.number}`,
|
|
668
|
-
url: result.url,
|
|
669
|
-
status: "open"
|
|
670
|
-
});
|
|
671
|
-
}
|
|
672
750
|
function createGitHubIssueTool(ctx) {
|
|
673
751
|
return definePluginTool2({
|
|
674
752
|
annotations: {
|
|
@@ -699,7 +777,6 @@ function createGitHubIssueTool(ctx) {
|
|
|
699
777
|
number: state.number,
|
|
700
778
|
url: state.url
|
|
701
779
|
};
|
|
702
|
-
await annotateIssue(ctx, completedInput, completedResult);
|
|
703
780
|
return gitHubIssueToolResult(
|
|
704
781
|
completedInput,
|
|
705
782
|
completedResult,
|
|
@@ -742,7 +819,6 @@ function createGitHubIssueTool(ctx) {
|
|
|
742
819
|
{ cause: error }
|
|
743
820
|
);
|
|
744
821
|
}
|
|
745
|
-
await annotateIssue(ctx, parsedInput, result);
|
|
746
822
|
return gitHubIssueToolResult(
|
|
747
823
|
parsedInput,
|
|
748
824
|
result,
|
|
@@ -1209,24 +1285,25 @@ function gitHubPullRequestToolResult(input, result, canSubscribe, omitSuggestedE
|
|
|
1209
1285
|
}) : void 0;
|
|
1210
1286
|
return { ...result, ...subscribable ? { subscribable } : void 0 };
|
|
1211
1287
|
}
|
|
1212
|
-
async function annotatePullRequest(ctx, input, result) {
|
|
1213
|
-
const repo = parseRepo4(input.repo);
|
|
1214
|
-
await ctx.annotations?.upsert({
|
|
1215
|
-
kind: "resource_link",
|
|
1216
|
-
key: `${repo.owner.toLowerCase()}/${repo.name.toLowerCase()}#${result.number}`,
|
|
1217
|
-
label: `${repo.owner}/${repo.name}#${result.number}`,
|
|
1218
|
-
url: result.url,
|
|
1219
|
-
status: input.draft ? "draft" : "open"
|
|
1220
|
-
});
|
|
1221
|
-
}
|
|
1222
1288
|
async function gitHubPullRequestStructuredResult(ctx, input, result, subscriptionConfig) {
|
|
1223
1289
|
const base = gitHubPullRequestToolResult(
|
|
1224
1290
|
input,
|
|
1225
1291
|
result,
|
|
1226
1292
|
ctx.events.canSubscribe
|
|
1227
1293
|
);
|
|
1294
|
+
const objectAnnotations = [
|
|
1295
|
+
githubObjectAnnotation({
|
|
1296
|
+
repo: input.repo,
|
|
1297
|
+
number: result.number,
|
|
1298
|
+
title: input.title,
|
|
1299
|
+
url: result.url,
|
|
1300
|
+
objectType: "code_change",
|
|
1301
|
+
status: input.draft ? "draft" : "open"
|
|
1302
|
+
})
|
|
1303
|
+
];
|
|
1228
1304
|
if (!subscriptionConfig || !base.subscribable) {
|
|
1229
1305
|
return {
|
|
1306
|
+
objectAnnotations,
|
|
1230
1307
|
target: "createPullRequest",
|
|
1231
1308
|
...base
|
|
1232
1309
|
};
|
|
@@ -1244,6 +1321,7 @@ async function gitHubPullRequestStructuredResult(ctx, input, result, subscriptio
|
|
|
1244
1321
|
subscriptionConfig.events
|
|
1245
1322
|
);
|
|
1246
1323
|
return {
|
|
1324
|
+
objectAnnotations,
|
|
1247
1325
|
target: "createPullRequest",
|
|
1248
1326
|
...data,
|
|
1249
1327
|
subscription
|
|
@@ -1255,6 +1333,7 @@ async function gitHubPullRequestStructuredResult(ctx, input, result, subscriptio
|
|
|
1255
1333
|
repo: input.repo
|
|
1256
1334
|
});
|
|
1257
1335
|
return {
|
|
1336
|
+
objectAnnotations,
|
|
1258
1337
|
target: "createPullRequest",
|
|
1259
1338
|
...base
|
|
1260
1339
|
};
|
|
@@ -1291,7 +1370,6 @@ function createGitHubPullRequestTool(ctx, subscriptionConfig) {
|
|
|
1291
1370
|
number: state.number,
|
|
1292
1371
|
url: state.url
|
|
1293
1372
|
};
|
|
1294
|
-
await annotatePullRequest(ctx, completedInput, completedResult);
|
|
1295
1373
|
return await gitHubPullRequestStructuredResult(
|
|
1296
1374
|
ctx,
|
|
1297
1375
|
completedInput,
|
|
@@ -1335,7 +1413,6 @@ function createGitHubPullRequestTool(ctx, subscriptionConfig) {
|
|
|
1335
1413
|
{ cause: error }
|
|
1336
1414
|
);
|
|
1337
1415
|
}
|
|
1338
|
-
await annotatePullRequest(ctx, parsedInput, result);
|
|
1339
1416
|
return await gitHubPullRequestStructuredResult(
|
|
1340
1417
|
ctx,
|
|
1341
1418
|
parsedInput,
|
|
@@ -1848,6 +1925,16 @@ function createGitHubUpdateIssueTool(ctx) {
|
|
|
1848
1925
|
repo: repo.ref
|
|
1849
1926
|
}) : void 0;
|
|
1850
1927
|
return {
|
|
1928
|
+
objectAnnotations: [
|
|
1929
|
+
githubObjectAnnotation({
|
|
1930
|
+
repo: repo.ref,
|
|
1931
|
+
number: providerResult.number,
|
|
1932
|
+
title: providerResult.title,
|
|
1933
|
+
url: providerResult.html_url,
|
|
1934
|
+
objectType: "task",
|
|
1935
|
+
status: providerResult.state
|
|
1936
|
+
})
|
|
1937
|
+
],
|
|
1851
1938
|
target: "updateIssue",
|
|
1852
1939
|
body: providerResult.body,
|
|
1853
1940
|
number: providerResult.number,
|
|
@@ -1986,6 +2073,7 @@ function createGitHubUpdatePullRequestTool(ctx) {
|
|
|
1986
2073
|
body: z9.string().nullable().optional().default(null),
|
|
1987
2074
|
draft: z9.boolean(),
|
|
1988
2075
|
html_url: z9.string(),
|
|
2076
|
+
merged: z9.boolean(),
|
|
1989
2077
|
number: z9.number(),
|
|
1990
2078
|
state: z9.string(),
|
|
1991
2079
|
title: z9.string()
|
|
@@ -2005,6 +2093,16 @@ function createGitHubUpdatePullRequestTool(ctx) {
|
|
|
2005
2093
|
url: providerResult.html_url
|
|
2006
2094
|
};
|
|
2007
2095
|
return {
|
|
2096
|
+
objectAnnotations: [
|
|
2097
|
+
githubObjectAnnotation({
|
|
2098
|
+
repo: repo.ref,
|
|
2099
|
+
number: providerResult.number,
|
|
2100
|
+
title: providerResult.title,
|
|
2101
|
+
url: providerResult.html_url,
|
|
2102
|
+
objectType: "code_change",
|
|
2103
|
+
status: providerResult.merged ? "merged" : providerResult.state === "open" && providerResult.draft ? "draft" : providerResult.state
|
|
2104
|
+
})
|
|
2105
|
+
],
|
|
2008
2106
|
target: "updatePullRequest",
|
|
2009
2107
|
...data
|
|
2010
2108
|
};
|
|
@@ -3332,13 +3430,15 @@ function createGitHubWebhookRoute(args) {
|
|
|
3332
3430
|
const status = pullRequestOutcome.state === "merged" ? "merged" : "closed";
|
|
3333
3431
|
await Promise.all(
|
|
3334
3432
|
recordedOutcome.conversationIds.map(
|
|
3335
|
-
(conversationId) =>
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3433
|
+
(conversationId) => updateGitHubAnnotation(
|
|
3434
|
+
args.annotations.forConversation(conversationId),
|
|
3435
|
+
{
|
|
3436
|
+
repo: pullRequestOutcome.repositoryFullName,
|
|
3437
|
+
number: pullRequestOutcome.number,
|
|
3438
|
+
objectType: "code_change",
|
|
3439
|
+
status
|
|
3440
|
+
}
|
|
3441
|
+
)
|
|
3342
3442
|
)
|
|
3343
3443
|
);
|
|
3344
3444
|
}
|
|
@@ -3373,13 +3473,15 @@ function createGitHubWebhookRoute(args) {
|
|
|
3373
3473
|
if (recordedOutcome.applied && issueOutcome.state === "closed") {
|
|
3374
3474
|
await Promise.all(
|
|
3375
3475
|
recordedOutcome.conversationIds.map(
|
|
3376
|
-
(conversationId) =>
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3476
|
+
(conversationId) => updateGitHubAnnotation(
|
|
3477
|
+
args.annotations.forConversation(conversationId),
|
|
3478
|
+
{
|
|
3479
|
+
repo: issueOutcome.repositoryFullName,
|
|
3480
|
+
number: issueOutcome.number,
|
|
3481
|
+
objectType: "task",
|
|
3482
|
+
status: "closed"
|
|
3483
|
+
}
|
|
3484
|
+
)
|
|
3383
3485
|
)
|
|
3384
3486
|
);
|
|
3385
3487
|
}
|
|
@@ -3496,50 +3598,6 @@ async function classifyGitHubPullRequestCommitComposition(args) {
|
|
|
3496
3598
|
return foundCommit ? "junior_only" : void 0;
|
|
3497
3599
|
}
|
|
3498
3600
|
|
|
3499
|
-
// src/annotations.ts
|
|
3500
|
-
var STATUS_ICON = {
|
|
3501
|
-
warning: "triangle-alert",
|
|
3502
|
-
open: "circle-dot",
|
|
3503
|
-
draft: "circle-dashed",
|
|
3504
|
-
merged: "git-merge",
|
|
3505
|
-
closed: "circle-x"
|
|
3506
|
-
};
|
|
3507
|
-
function isPullRequestUrl(url) {
|
|
3508
|
-
try {
|
|
3509
|
-
return /^\/[^/]+\/[^/]+\/pull\/\d+(?:\/|$)/.test(new URL(url).pathname);
|
|
3510
|
-
} catch {
|
|
3511
|
-
return false;
|
|
3512
|
-
}
|
|
3513
|
-
}
|
|
3514
|
-
function sidebarIconForStatus(status, url) {
|
|
3515
|
-
if (status === "open" && isPullRequestUrl(url)) return "git-pull-request";
|
|
3516
|
-
return STATUS_ICON[status];
|
|
3517
|
-
}
|
|
3518
|
-
function repositoryName(annotation) {
|
|
3519
|
-
try {
|
|
3520
|
-
const [, , repo] = new URL(annotation.url).pathname.split("/");
|
|
3521
|
-
return repo || void 0;
|
|
3522
|
-
} catch {
|
|
3523
|
-
return void 0;
|
|
3524
|
-
}
|
|
3525
|
-
}
|
|
3526
|
-
function githubSidebarAnnotations(annotations) {
|
|
3527
|
-
return annotations.flatMap((annotation) => {
|
|
3528
|
-
const status = annotation.status;
|
|
3529
|
-
const label = repositoryName(annotation);
|
|
3530
|
-
return status && label ? [
|
|
3531
|
-
{
|
|
3532
|
-
annotation: {
|
|
3533
|
-
icon: sidebarIconForStatus(status, annotation.url),
|
|
3534
|
-
key: annotation.key,
|
|
3535
|
-
label
|
|
3536
|
-
},
|
|
3537
|
-
updatedAt: annotation.updatedAt
|
|
3538
|
-
}
|
|
3539
|
-
] : [];
|
|
3540
|
-
}).sort((left, right) => right.updatedAt.localeCompare(left.updatedAt)).map(({ annotation }) => annotation);
|
|
3541
|
-
}
|
|
3542
|
-
|
|
3543
3601
|
// src/git-config.ts
|
|
3544
3602
|
function cleanIdentityPart(value) {
|
|
3545
3603
|
return String(value ?? "").replaceAll("\n", " ").replaceAll("\r", " ").replace(/[<>]/g, "").trim();
|
|
@@ -12,6 +12,18 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
|
|
|
12
12
|
path: string;
|
|
13
13
|
repo: string;
|
|
14
14
|
target: "cloneRepository";
|
|
15
|
+
objectAnnotations?: {
|
|
16
|
+
kind: "object";
|
|
17
|
+
key: string;
|
|
18
|
+
label: string;
|
|
19
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
20
|
+
title: string;
|
|
21
|
+
url: string | null;
|
|
22
|
+
description?: string | undefined;
|
|
23
|
+
status?: string | undefined;
|
|
24
|
+
trigger?: string | undefined;
|
|
25
|
+
warning?: string | undefined;
|
|
26
|
+
}[] | undefined;
|
|
15
27
|
truncated?: boolean | undefined;
|
|
16
28
|
continuation?: {
|
|
17
29
|
arguments: Record<string, unknown>;
|
|
@@ -21,6 +33,18 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
|
|
|
21
33
|
path: string;
|
|
22
34
|
repo: string;
|
|
23
35
|
target: "cloneRepository";
|
|
36
|
+
objectAnnotations?: {
|
|
37
|
+
kind: "object";
|
|
38
|
+
key: string;
|
|
39
|
+
label: string;
|
|
40
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
41
|
+
title: string;
|
|
42
|
+
url: string | null;
|
|
43
|
+
description?: string | undefined;
|
|
44
|
+
status?: string | undefined;
|
|
45
|
+
trigger?: string | undefined;
|
|
46
|
+
warning?: string | undefined;
|
|
47
|
+
}[] | undefined;
|
|
24
48
|
truncated?: boolean | undefined;
|
|
25
49
|
continuation?: {
|
|
26
50
|
arguments: Record<string, unknown>;
|
|
@@ -9,6 +9,18 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
|
|
|
9
9
|
number: number;
|
|
10
10
|
url: string;
|
|
11
11
|
target: "createIssue";
|
|
12
|
+
objectAnnotations?: {
|
|
13
|
+
kind: "object";
|
|
14
|
+
key: string;
|
|
15
|
+
label: string;
|
|
16
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
17
|
+
title: string;
|
|
18
|
+
url: string | null;
|
|
19
|
+
description?: string | undefined;
|
|
20
|
+
status?: string | undefined;
|
|
21
|
+
trigger?: string | undefined;
|
|
22
|
+
warning?: string | undefined;
|
|
23
|
+
}[] | undefined;
|
|
12
24
|
truncated?: boolean | undefined;
|
|
13
25
|
continuation?: {
|
|
14
26
|
arguments: Record<string, unknown>;
|
|
@@ -26,6 +38,18 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
|
|
|
26
38
|
number: number;
|
|
27
39
|
url: string;
|
|
28
40
|
target: "createIssue";
|
|
41
|
+
objectAnnotations?: {
|
|
42
|
+
kind: "object";
|
|
43
|
+
key: string;
|
|
44
|
+
label: string;
|
|
45
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
46
|
+
title: string;
|
|
47
|
+
url: string | null;
|
|
48
|
+
description?: string | undefined;
|
|
49
|
+
status?: string | undefined;
|
|
50
|
+
trigger?: string | undefined;
|
|
51
|
+
warning?: string | undefined;
|
|
52
|
+
}[] | undefined;
|
|
29
53
|
truncated?: boolean | undefined;
|
|
30
54
|
continuation?: {
|
|
31
55
|
arguments: Record<string, unknown>;
|
|
@@ -12,6 +12,18 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
|
|
|
12
12
|
number: number;
|
|
13
13
|
url: string;
|
|
14
14
|
target: "createPullRequest";
|
|
15
|
+
objectAnnotations?: {
|
|
16
|
+
kind: "object";
|
|
17
|
+
key: string;
|
|
18
|
+
label: string;
|
|
19
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
20
|
+
title: string;
|
|
21
|
+
url: string | null;
|
|
22
|
+
description?: string | undefined;
|
|
23
|
+
status?: string | undefined;
|
|
24
|
+
trigger?: string | undefined;
|
|
25
|
+
warning?: string | undefined;
|
|
26
|
+
}[] | undefined;
|
|
15
27
|
truncated?: boolean | undefined;
|
|
16
28
|
continuation?: {
|
|
17
29
|
arguments: Record<string, unknown>;
|
|
@@ -33,6 +45,18 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
|
|
|
33
45
|
number: number;
|
|
34
46
|
url: string;
|
|
35
47
|
target: "createPullRequest";
|
|
48
|
+
objectAnnotations?: {
|
|
49
|
+
kind: "object";
|
|
50
|
+
key: string;
|
|
51
|
+
label: string;
|
|
52
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
53
|
+
title: string;
|
|
54
|
+
url: string | null;
|
|
55
|
+
description?: string | undefined;
|
|
56
|
+
status?: string | undefined;
|
|
57
|
+
trigger?: string | undefined;
|
|
58
|
+
warning?: string | undefined;
|
|
59
|
+
}[] | undefined;
|
|
36
60
|
truncated?: boolean | undefined;
|
|
37
61
|
continuation?: {
|
|
38
62
|
arguments: Record<string, unknown>;
|
|
@@ -34,6 +34,18 @@ export declare function createGitHubGetDeploymentTool(ctx: {
|
|
|
34
34
|
environment: string | null;
|
|
35
35
|
repo: string;
|
|
36
36
|
target: "getDeployment";
|
|
37
|
+
objectAnnotations?: {
|
|
38
|
+
kind: "object";
|
|
39
|
+
key: string;
|
|
40
|
+
label: string;
|
|
41
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
42
|
+
title: string;
|
|
43
|
+
url: string | null;
|
|
44
|
+
description?: string | undefined;
|
|
45
|
+
status?: string | undefined;
|
|
46
|
+
trigger?: string | undefined;
|
|
47
|
+
warning?: string | undefined;
|
|
48
|
+
}[] | undefined;
|
|
37
49
|
truncated?: boolean | undefined;
|
|
38
50
|
continuation?: {
|
|
39
51
|
arguments: Record<string, unknown>;
|
|
@@ -72,6 +84,18 @@ export declare function createGitHubGetDeploymentTool(ctx: {
|
|
|
72
84
|
environment: string | null;
|
|
73
85
|
repo: string;
|
|
74
86
|
target: "getDeployment";
|
|
87
|
+
objectAnnotations?: {
|
|
88
|
+
kind: "object";
|
|
89
|
+
key: string;
|
|
90
|
+
label: string;
|
|
91
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
92
|
+
title: string;
|
|
93
|
+
url: string | null;
|
|
94
|
+
description?: string | undefined;
|
|
95
|
+
status?: string | undefined;
|
|
96
|
+
trigger?: string | undefined;
|
|
97
|
+
warning?: string | undefined;
|
|
98
|
+
}[] | undefined;
|
|
75
99
|
truncated?: boolean | undefined;
|
|
76
100
|
continuation?: {
|
|
77
101
|
arguments: Record<string, unknown>;
|
|
@@ -19,6 +19,18 @@ export declare function createGitHubGetPullRequestTool(ctx: {
|
|
|
19
19
|
title: string;
|
|
20
20
|
url: string;
|
|
21
21
|
target: "getPullRequest";
|
|
22
|
+
objectAnnotations?: {
|
|
23
|
+
kind: "object";
|
|
24
|
+
key: string;
|
|
25
|
+
label: string;
|
|
26
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
27
|
+
title: string;
|
|
28
|
+
url: string | null;
|
|
29
|
+
description?: string | undefined;
|
|
30
|
+
status?: string | undefined;
|
|
31
|
+
trigger?: string | undefined;
|
|
32
|
+
warning?: string | undefined;
|
|
33
|
+
}[] | undefined;
|
|
22
34
|
truncated?: boolean | undefined;
|
|
23
35
|
continuation?: {
|
|
24
36
|
arguments: Record<string, unknown>;
|
|
@@ -43,6 +55,18 @@ export declare function createGitHubGetPullRequestTool(ctx: {
|
|
|
43
55
|
title: string;
|
|
44
56
|
url: string;
|
|
45
57
|
target: "getPullRequest";
|
|
58
|
+
objectAnnotations?: {
|
|
59
|
+
kind: "object";
|
|
60
|
+
key: string;
|
|
61
|
+
label: string;
|
|
62
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
63
|
+
title: string;
|
|
64
|
+
url: string | null;
|
|
65
|
+
description?: string | undefined;
|
|
66
|
+
status?: string | undefined;
|
|
67
|
+
trigger?: string | undefined;
|
|
68
|
+
warning?: string | undefined;
|
|
69
|
+
}[] | undefined;
|
|
46
70
|
truncated?: boolean | undefined;
|
|
47
71
|
continuation?: {
|
|
48
72
|
arguments: Record<string, unknown>;
|
|
@@ -23,6 +23,18 @@ export declare function createGitHubGetReleaseTool(ctx: {
|
|
|
23
23
|
repo: string;
|
|
24
24
|
tag: string | null;
|
|
25
25
|
target: "getRelease";
|
|
26
|
+
objectAnnotations?: {
|
|
27
|
+
kind: "object";
|
|
28
|
+
key: string;
|
|
29
|
+
label: string;
|
|
30
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
31
|
+
title: string;
|
|
32
|
+
url: string | null;
|
|
33
|
+
description?: string | undefined;
|
|
34
|
+
status?: string | undefined;
|
|
35
|
+
trigger?: string | undefined;
|
|
36
|
+
warning?: string | undefined;
|
|
37
|
+
}[] | undefined;
|
|
26
38
|
truncated?: boolean | undefined;
|
|
27
39
|
continuation?: {
|
|
28
40
|
arguments: Record<string, unknown>;
|
|
@@ -51,6 +63,18 @@ export declare function createGitHubGetReleaseTool(ctx: {
|
|
|
51
63
|
repo: string;
|
|
52
64
|
tag: string | null;
|
|
53
65
|
target: "getRelease";
|
|
66
|
+
objectAnnotations?: {
|
|
67
|
+
kind: "object";
|
|
68
|
+
key: string;
|
|
69
|
+
label: string;
|
|
70
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
71
|
+
title: string;
|
|
72
|
+
url: string | null;
|
|
73
|
+
description?: string | undefined;
|
|
74
|
+
status?: string | undefined;
|
|
75
|
+
trigger?: string | undefined;
|
|
76
|
+
warning?: string | undefined;
|
|
77
|
+
}[] | undefined;
|
|
54
78
|
truncated?: boolean | undefined;
|
|
55
79
|
continuation?: {
|
|
56
80
|
arguments: Record<string, unknown>;
|
|
@@ -14,6 +14,18 @@ export declare function createGitHubGetRepositoryTool(ctx: {
|
|
|
14
14
|
private: boolean;
|
|
15
15
|
url: string;
|
|
16
16
|
target: "getRepository";
|
|
17
|
+
objectAnnotations?: {
|
|
18
|
+
kind: "object";
|
|
19
|
+
key: string;
|
|
20
|
+
label: string;
|
|
21
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
22
|
+
title: string;
|
|
23
|
+
url: string | null;
|
|
24
|
+
description?: string | undefined;
|
|
25
|
+
status?: string | undefined;
|
|
26
|
+
trigger?: string | undefined;
|
|
27
|
+
warning?: string | undefined;
|
|
28
|
+
}[] | undefined;
|
|
17
29
|
truncated?: boolean | undefined;
|
|
18
30
|
continuation?: {
|
|
19
31
|
arguments: Record<string, unknown>;
|
|
@@ -34,6 +46,18 @@ export declare function createGitHubGetRepositoryTool(ctx: {
|
|
|
34
46
|
private: boolean;
|
|
35
47
|
url: string;
|
|
36
48
|
target: "getRepository";
|
|
49
|
+
objectAnnotations?: {
|
|
50
|
+
kind: "object";
|
|
51
|
+
key: string;
|
|
52
|
+
label: string;
|
|
53
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
54
|
+
title: string;
|
|
55
|
+
url: string | null;
|
|
56
|
+
description?: string | undefined;
|
|
57
|
+
status?: string | undefined;
|
|
58
|
+
trigger?: string | undefined;
|
|
59
|
+
warning?: string | undefined;
|
|
60
|
+
}[] | undefined;
|
|
37
61
|
truncated?: boolean | undefined;
|
|
38
62
|
continuation?: {
|
|
39
63
|
arguments: Record<string, unknown>;
|
|
@@ -12,6 +12,18 @@ export declare function createGitHubResolvePullRequestReviewThreadTool(ctx: {
|
|
|
12
12
|
number: number;
|
|
13
13
|
threadId: string;
|
|
14
14
|
resolved: boolean;
|
|
15
|
+
objectAnnotations?: {
|
|
16
|
+
kind: "object";
|
|
17
|
+
key: string;
|
|
18
|
+
label: string;
|
|
19
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
20
|
+
title: string;
|
|
21
|
+
url: string | null;
|
|
22
|
+
description?: string | undefined;
|
|
23
|
+
status?: string | undefined;
|
|
24
|
+
trigger?: string | undefined;
|
|
25
|
+
warning?: string | undefined;
|
|
26
|
+
}[] | undefined;
|
|
15
27
|
truncated?: boolean | undefined;
|
|
16
28
|
continuation?: {
|
|
17
29
|
arguments: Record<string, unknown>;
|
|
@@ -24,6 +36,18 @@ export declare function createGitHubResolvePullRequestReviewThreadTool(ctx: {
|
|
|
24
36
|
number: number;
|
|
25
37
|
threadId: string;
|
|
26
38
|
resolved: boolean;
|
|
39
|
+
objectAnnotations?: {
|
|
40
|
+
kind: "object";
|
|
41
|
+
key: string;
|
|
42
|
+
label: string;
|
|
43
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
44
|
+
title: string;
|
|
45
|
+
url: string | null;
|
|
46
|
+
description?: string | undefined;
|
|
47
|
+
status?: string | undefined;
|
|
48
|
+
trigger?: string | undefined;
|
|
49
|
+
warning?: string | undefined;
|
|
50
|
+
}[] | undefined;
|
|
27
51
|
truncated?: boolean | undefined;
|
|
28
52
|
continuation?: {
|
|
29
53
|
arguments: Record<string, unknown>;
|
|
@@ -21,6 +21,18 @@ export declare function createGitHubSubmitPullRequestReviewTool(egress: PluginEg
|
|
|
21
21
|
reviewId: number;
|
|
22
22
|
state: string;
|
|
23
23
|
url: string;
|
|
24
|
+
objectAnnotations?: {
|
|
25
|
+
kind: "object";
|
|
26
|
+
key: string;
|
|
27
|
+
label: string;
|
|
28
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
29
|
+
title: string;
|
|
30
|
+
url: string | null;
|
|
31
|
+
description?: string | undefined;
|
|
32
|
+
status?: string | undefined;
|
|
33
|
+
trigger?: string | undefined;
|
|
34
|
+
warning?: string | undefined;
|
|
35
|
+
}[] | undefined;
|
|
24
36
|
truncated?: boolean | undefined;
|
|
25
37
|
continuation?: {
|
|
26
38
|
arguments: Record<string, unknown>;
|
|
@@ -34,6 +46,18 @@ export declare function createGitHubSubmitPullRequestReviewTool(egress: PluginEg
|
|
|
34
46
|
reviewId: number;
|
|
35
47
|
state: string;
|
|
36
48
|
url: string;
|
|
49
|
+
objectAnnotations?: {
|
|
50
|
+
kind: "object";
|
|
51
|
+
key: string;
|
|
52
|
+
label: string;
|
|
53
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
54
|
+
title: string;
|
|
55
|
+
url: string | null;
|
|
56
|
+
description?: string | undefined;
|
|
57
|
+
status?: string | undefined;
|
|
58
|
+
trigger?: string | undefined;
|
|
59
|
+
warning?: string | undefined;
|
|
60
|
+
}[] | undefined;
|
|
37
61
|
truncated?: boolean | undefined;
|
|
38
62
|
continuation?: {
|
|
39
63
|
arguments: Record<string, unknown>;
|
|
@@ -32,6 +32,18 @@ export declare function createGitHubUpdateIssueTool(ctx: {
|
|
|
32
32
|
title: string;
|
|
33
33
|
url: string;
|
|
34
34
|
target: "updateIssue";
|
|
35
|
+
objectAnnotations?: {
|
|
36
|
+
kind: "object";
|
|
37
|
+
key: string;
|
|
38
|
+
label: string;
|
|
39
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
40
|
+
title: string;
|
|
41
|
+
url: string | null;
|
|
42
|
+
description?: string | undefined;
|
|
43
|
+
status?: string | undefined;
|
|
44
|
+
trigger?: string | undefined;
|
|
45
|
+
warning?: string | undefined;
|
|
46
|
+
}[] | undefined;
|
|
35
47
|
truncated?: boolean | undefined;
|
|
36
48
|
continuation?: {
|
|
37
49
|
arguments: Record<string, unknown>;
|
|
@@ -52,6 +64,18 @@ export declare function createGitHubUpdateIssueTool(ctx: {
|
|
|
52
64
|
title: string;
|
|
53
65
|
url: string;
|
|
54
66
|
target: "updateIssue";
|
|
67
|
+
objectAnnotations?: {
|
|
68
|
+
kind: "object";
|
|
69
|
+
key: string;
|
|
70
|
+
label: string;
|
|
71
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
72
|
+
title: string;
|
|
73
|
+
url: string | null;
|
|
74
|
+
description?: string | undefined;
|
|
75
|
+
status?: string | undefined;
|
|
76
|
+
trigger?: string | undefined;
|
|
77
|
+
warning?: string | undefined;
|
|
78
|
+
}[] | undefined;
|
|
55
79
|
truncated?: boolean | undefined;
|
|
56
80
|
continuation?: {
|
|
57
81
|
arguments: Record<string, unknown>;
|
|
@@ -38,6 +38,18 @@ export declare function createGitHubUpdatePullRequestFeedbackTool(ctx: {
|
|
|
38
38
|
commentId: number;
|
|
39
39
|
status: "addressed" | "declined";
|
|
40
40
|
reactionId: number;
|
|
41
|
+
objectAnnotations?: {
|
|
42
|
+
kind: "object";
|
|
43
|
+
key: string;
|
|
44
|
+
label: string;
|
|
45
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
46
|
+
title: string;
|
|
47
|
+
url: string | null;
|
|
48
|
+
description?: string | undefined;
|
|
49
|
+
status?: string | undefined;
|
|
50
|
+
trigger?: string | undefined;
|
|
51
|
+
warning?: string | undefined;
|
|
52
|
+
}[] | undefined;
|
|
41
53
|
truncated?: boolean | undefined;
|
|
42
54
|
continuation?: {
|
|
43
55
|
arguments: Record<string, unknown>;
|
|
@@ -50,6 +62,18 @@ export declare function createGitHubUpdatePullRequestFeedbackTool(ctx: {
|
|
|
50
62
|
commentId: number;
|
|
51
63
|
status: "addressed" | "declined";
|
|
52
64
|
reactionId: number;
|
|
65
|
+
objectAnnotations?: {
|
|
66
|
+
kind: "object";
|
|
67
|
+
key: string;
|
|
68
|
+
label: string;
|
|
69
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
70
|
+
title: string;
|
|
71
|
+
url: string | null;
|
|
72
|
+
description?: string | undefined;
|
|
73
|
+
status?: string | undefined;
|
|
74
|
+
trigger?: string | undefined;
|
|
75
|
+
warning?: string | undefined;
|
|
76
|
+
}[] | undefined;
|
|
53
77
|
truncated?: boolean | undefined;
|
|
54
78
|
continuation?: {
|
|
55
79
|
arguments: Record<string, unknown>;
|
|
@@ -35,6 +35,18 @@ export declare function createGitHubUpdatePullRequestTool(ctx: {
|
|
|
35
35
|
title: string;
|
|
36
36
|
url: string;
|
|
37
37
|
target: "updatePullRequest";
|
|
38
|
+
objectAnnotations?: {
|
|
39
|
+
kind: "object";
|
|
40
|
+
key: string;
|
|
41
|
+
label: string;
|
|
42
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
43
|
+
title: string;
|
|
44
|
+
url: string | null;
|
|
45
|
+
description?: string | undefined;
|
|
46
|
+
status?: string | undefined;
|
|
47
|
+
trigger?: string | undefined;
|
|
48
|
+
warning?: string | undefined;
|
|
49
|
+
}[] | undefined;
|
|
38
50
|
truncated?: boolean | undefined;
|
|
39
51
|
continuation?: {
|
|
40
52
|
arguments: Record<string, unknown>;
|
|
@@ -57,6 +69,18 @@ export declare function createGitHubUpdatePullRequestTool(ctx: {
|
|
|
57
69
|
title: string;
|
|
58
70
|
url: string;
|
|
59
71
|
target: "updatePullRequest";
|
|
72
|
+
objectAnnotations?: {
|
|
73
|
+
kind: "object";
|
|
74
|
+
key: string;
|
|
75
|
+
label: string;
|
|
76
|
+
objectType: "task" | "code_change" | "automation" | "item";
|
|
77
|
+
title: string;
|
|
78
|
+
url: string | null;
|
|
79
|
+
description?: string | undefined;
|
|
80
|
+
status?: string | undefined;
|
|
81
|
+
trigger?: string | undefined;
|
|
82
|
+
warning?: string | undefined;
|
|
83
|
+
}[] | undefined;
|
|
60
84
|
truncated?: boolean | undefined;
|
|
61
85
|
continuation?: {
|
|
62
86
|
arguments: Record<string, unknown>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior-github",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.223.0",
|
|
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.5.4",
|
|
34
|
-
"@sentry/junior-plugin-api": "0.
|
|
34
|
+
"@sentry/junior-plugin-api": "0.223.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@oxlint/plugins": "1.79.0",
|