@sentry/junior-github 0.116.1 → 0.118.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/README.md +6 -4
- package/SETUP.md +11 -2
- package/dist/{chunk-JDNXIBCQ.js → chunk-EPYBKNXS.js} +165 -3
- package/dist/index.js +524 -313
- package/dist/resource-events/deployment.d.ts +14 -0
- package/dist/testing.js +1 -1
- package/dist/tools/get-deployment.d.ts +85 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
+
gitHubDeploymentSourceSubscribable,
|
|
2
3
|
gitHubPullRequestSubscribable,
|
|
3
4
|
normalizeGitHubResourceEvents
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EPYBKNXS.js";
|
|
5
6
|
|
|
6
7
|
// src/plugin.ts
|
|
7
8
|
import {
|
|
@@ -274,6 +275,7 @@ var createIssueStateSchema = Type.Union([
|
|
|
274
275
|
Type.Object(
|
|
275
276
|
{
|
|
276
277
|
createdAtMs: Type.Number(),
|
|
278
|
+
input: Type.Optional(createIssueInputSchema),
|
|
277
279
|
number: Type.Number(),
|
|
278
280
|
status: Type.Literal("completed"),
|
|
279
281
|
url: Type.String()
|
|
@@ -283,6 +285,7 @@ var createIssueStateSchema = Type.Union([
|
|
|
283
285
|
Type.Object(
|
|
284
286
|
{
|
|
285
287
|
createdAtMs: Type.Number(),
|
|
288
|
+
input: Type.Optional(createIssueInputSchema),
|
|
286
289
|
status: Type.Literal("pending")
|
|
287
290
|
},
|
|
288
291
|
{ additionalProperties: false }
|
|
@@ -434,6 +437,16 @@ async function createGitHubIssue(ctx, request) {
|
|
|
434
437
|
url: issue.html_url
|
|
435
438
|
};
|
|
436
439
|
}
|
|
440
|
+
async function annotateIssue(ctx, input, result) {
|
|
441
|
+
const repo = parseRepo(input.repo);
|
|
442
|
+
await ctx.annotations?.upsert({
|
|
443
|
+
kind: "resource_link",
|
|
444
|
+
key: `${repo.owner.toLowerCase()}/${repo.name.toLowerCase()}#${result.number}`,
|
|
445
|
+
label: `${repo.owner}/${repo.name}#${result.number}`,
|
|
446
|
+
url: result.url,
|
|
447
|
+
status: "open"
|
|
448
|
+
});
|
|
449
|
+
}
|
|
437
450
|
function createGitHubIssueTool(ctx) {
|
|
438
451
|
return definePluginTool({
|
|
439
452
|
description: "Create a GitHub issue with a runtime-owned Junior conversation footer. Use this instead of shelling out to gh issue create when creating issues.",
|
|
@@ -453,10 +466,13 @@ function createGitHubIssueTool(ctx) {
|
|
|
453
466
|
async () => {
|
|
454
467
|
const state = createIssueState(await ctx.state.get(key));
|
|
455
468
|
if (state?.status === "completed") {
|
|
456
|
-
|
|
469
|
+
const completedInput = state.input ?? parsedInput;
|
|
470
|
+
const completedResult = {
|
|
457
471
|
number: state.number,
|
|
458
472
|
url: state.url
|
|
459
|
-
}
|
|
473
|
+
};
|
|
474
|
+
await annotateIssue(ctx, completedInput, completedResult);
|
|
475
|
+
return gitHubIssueToolResult(completedResult);
|
|
460
476
|
}
|
|
461
477
|
if (state?.status === "pending") {
|
|
462
478
|
throw new Error(
|
|
@@ -470,7 +486,8 @@ function createGitHubIssueTool(ctx) {
|
|
|
470
486
|
);
|
|
471
487
|
const pendingState = {
|
|
472
488
|
status: "pending",
|
|
473
|
-
createdAtMs: Date.now()
|
|
489
|
+
createdAtMs: Date.now(),
|
|
490
|
+
input: parsedInput
|
|
474
491
|
};
|
|
475
492
|
await ctx.state.set(
|
|
476
493
|
key,
|
|
@@ -492,6 +509,7 @@ function createGitHubIssueTool(ctx) {
|
|
|
492
509
|
{ cause: error }
|
|
493
510
|
);
|
|
494
511
|
}
|
|
512
|
+
await annotateIssue(ctx, parsedInput, result);
|
|
495
513
|
return gitHubIssueToolResult(result);
|
|
496
514
|
} catch (error) {
|
|
497
515
|
if (isEgressAuthRequired(error) || isDefinitiveGitHubIssueCreateRejection(error)) {
|
|
@@ -505,20 +523,216 @@ function createGitHubIssueTool(ctx) {
|
|
|
505
523
|
});
|
|
506
524
|
}
|
|
507
525
|
|
|
508
|
-
// src/tools/
|
|
526
|
+
// src/tools/get-deployment.ts
|
|
509
527
|
import {
|
|
510
528
|
definePluginTool as definePluginTool2,
|
|
511
|
-
EgressAuthRequired as EgressAuthRequired2,
|
|
512
529
|
PluginToolInputError as PluginToolInputError3,
|
|
513
|
-
pluginToolResultSchema as pluginToolResultSchema2
|
|
530
|
+
pluginToolResultSchema as pluginToolResultSchema2,
|
|
531
|
+
subscribableResourceSchema
|
|
532
|
+
} from "@sentry/junior-plugin-api";
|
|
533
|
+
import { z as z2 } from "zod";
|
|
534
|
+
var commitShaSchema = z2.string().regex(/^[0-9a-f]{40}$/i);
|
|
535
|
+
var inputSchema = z2.object({
|
|
536
|
+
repo: z2.string().describe('Repository in "owner/name" format.'),
|
|
537
|
+
commitSha: commitShaSchema.describe(
|
|
538
|
+
"Full 40-character Git commit SHA recorded by the deployment."
|
|
539
|
+
),
|
|
540
|
+
environment: z2.string().trim().min(1).describe('GitHub deployment environment, such as "Production".')
|
|
541
|
+
}).strict();
|
|
542
|
+
var statusSchema = z2.object({
|
|
543
|
+
createdAt: z2.string(),
|
|
544
|
+
creator: z2.string().nullable(),
|
|
545
|
+
description: z2.string().nullable(),
|
|
546
|
+
environmentUrl: z2.string().nullable(),
|
|
547
|
+
id: z2.number(),
|
|
548
|
+
logUrl: z2.string().nullable(),
|
|
549
|
+
state: z2.string()
|
|
550
|
+
}).strict();
|
|
551
|
+
var deploymentSchema = z2.object({
|
|
552
|
+
createdAt: z2.string(),
|
|
553
|
+
creator: z2.string().nullable(),
|
|
554
|
+
description: z2.string().nullable(),
|
|
555
|
+
environment: z2.string(),
|
|
556
|
+
id: z2.number(),
|
|
557
|
+
latestStatus: statusSchema.nullable(),
|
|
558
|
+
ref: z2.string(),
|
|
559
|
+
sha: commitShaSchema,
|
|
560
|
+
updatedAt: z2.string(),
|
|
561
|
+
url: z2.string()
|
|
562
|
+
}).strict();
|
|
563
|
+
var deploymentSourceSchema = z2.object({
|
|
564
|
+
commitSha: commitShaSchema,
|
|
565
|
+
deployment: deploymentSchema.nullable(),
|
|
566
|
+
environment: z2.string(),
|
|
567
|
+
repo: z2.string(),
|
|
568
|
+
subscribable: subscribableResourceSchema.optional()
|
|
569
|
+
}).strict();
|
|
570
|
+
var outputSchema = pluginToolResultSchema2.extend({
|
|
571
|
+
data: deploymentSourceSchema,
|
|
572
|
+
ok: z2.literal(true),
|
|
573
|
+
status: z2.literal("success"),
|
|
574
|
+
target: z2.literal("getDeployment"),
|
|
575
|
+
...deploymentSourceSchema.shape
|
|
576
|
+
}).strict();
|
|
577
|
+
var providerCreatorSchema = z2.object({ login: z2.string() }).passthrough().nullable();
|
|
578
|
+
var providerDeploymentSchema = z2.object({
|
|
579
|
+
created_at: z2.string(),
|
|
580
|
+
creator: providerCreatorSchema,
|
|
581
|
+
description: z2.string().nullable(),
|
|
582
|
+
environment: z2.string(),
|
|
583
|
+
id: z2.number(),
|
|
584
|
+
ref: z2.string(),
|
|
585
|
+
sha: commitShaSchema,
|
|
586
|
+
updated_at: z2.string()
|
|
587
|
+
}).passthrough();
|
|
588
|
+
var providerStatusSchema = z2.object({
|
|
589
|
+
created_at: z2.string(),
|
|
590
|
+
creator: providerCreatorSchema,
|
|
591
|
+
description: z2.string().nullable().optional(),
|
|
592
|
+
environment_url: z2.string().nullable().optional(),
|
|
593
|
+
id: z2.number(),
|
|
594
|
+
log_url: z2.string().nullable().optional(),
|
|
595
|
+
state: z2.string()
|
|
596
|
+
}).passthrough();
|
|
597
|
+
function parseRepo2(value) {
|
|
598
|
+
const parts = value.split("/").map((part) => part.trim());
|
|
599
|
+
if (parts.length !== 2 || !parts[0] || !parts[1]) {
|
|
600
|
+
throw new PluginToolInputError3('repo must use "owner/name" format');
|
|
601
|
+
}
|
|
602
|
+
return { owner: parts[0], name: parts[1], ref: `${parts[0]}/${parts[1]}` };
|
|
603
|
+
}
|
|
604
|
+
async function readJson(response) {
|
|
605
|
+
const text2 = await response.text();
|
|
606
|
+
if (!text2) return void 0;
|
|
607
|
+
try {
|
|
608
|
+
return JSON.parse(text2);
|
|
609
|
+
} catch {
|
|
610
|
+
return text2;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
function throwLookupError(target, status, body) {
|
|
614
|
+
const message = `GitHub ${target} lookup failed with HTTP ${status}`;
|
|
615
|
+
const hasValidationErrors = body !== null && typeof body === "object" && !Array.isArray(body) && Array.isArray(body.errors) && body.errors.length > 0;
|
|
616
|
+
if (target === "deployment" && (status === 404 || status === 422 && hasValidationErrors)) {
|
|
617
|
+
throw new PluginToolInputError3(message);
|
|
618
|
+
}
|
|
619
|
+
throw new Error(message);
|
|
620
|
+
}
|
|
621
|
+
function repositoryUrl(repo, path) {
|
|
622
|
+
return `https://api.github.com/repos/${encodeURIComponent(repo.owner)}/${encodeURIComponent(repo.name)}/${path}`;
|
|
623
|
+
}
|
|
624
|
+
function createGitHubGetDeploymentTool(ctx) {
|
|
625
|
+
return definePluginTool2({
|
|
626
|
+
description: "Get the latest GitHub deployment and status for an exact repository, environment, and full commit SHA. The result remains subscribable when no deployment exists yet, so use it before waiting for a deployment outcome.",
|
|
627
|
+
inputSchema,
|
|
628
|
+
outputSchema,
|
|
629
|
+
async execute(input) {
|
|
630
|
+
const repo = parseRepo2(input.repo);
|
|
631
|
+
const commitSha = input.commitSha.toLowerCase();
|
|
632
|
+
const deploymentsUrl = new URL(repositoryUrl(repo, "deployments"));
|
|
633
|
+
deploymentsUrl.searchParams.set("sha", commitSha);
|
|
634
|
+
deploymentsUrl.searchParams.set("environment", input.environment);
|
|
635
|
+
deploymentsUrl.searchParams.set("per_page", "1");
|
|
636
|
+
const deploymentsResponse = await ctx.egress.fetch({
|
|
637
|
+
provider: "github",
|
|
638
|
+
operation: "github.deployment.list",
|
|
639
|
+
request: new Request(deploymentsUrl, {
|
|
640
|
+
headers: {
|
|
641
|
+
Accept: "application/vnd.github+json",
|
|
642
|
+
"X-GitHub-Api-Version": "2022-11-28"
|
|
643
|
+
}
|
|
644
|
+
})
|
|
645
|
+
});
|
|
646
|
+
const deploymentsBody = await readJson(deploymentsResponse);
|
|
647
|
+
if (!deploymentsResponse.ok) {
|
|
648
|
+
throwLookupError(
|
|
649
|
+
"deployment",
|
|
650
|
+
deploymentsResponse.status,
|
|
651
|
+
deploymentsBody
|
|
652
|
+
);
|
|
653
|
+
}
|
|
654
|
+
const providerDeployment = z2.array(providerDeploymentSchema).parse(deploymentsBody)[0];
|
|
655
|
+
let deployment = null;
|
|
656
|
+
if (providerDeployment) {
|
|
657
|
+
const statusesResponse = await ctx.egress.fetch({
|
|
658
|
+
provider: "github",
|
|
659
|
+
operation: "github.deployment-status.list",
|
|
660
|
+
request: new Request(
|
|
661
|
+
`${repositoryUrl(repo, `deployments/${providerDeployment.id}/statuses`)}?per_page=1`,
|
|
662
|
+
{
|
|
663
|
+
headers: {
|
|
664
|
+
Accept: "application/vnd.github+json",
|
|
665
|
+
"X-GitHub-Api-Version": "2022-11-28"
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
)
|
|
669
|
+
});
|
|
670
|
+
const statusesBody = await readJson(statusesResponse);
|
|
671
|
+
if (!statusesResponse.ok) {
|
|
672
|
+
throwLookupError(
|
|
673
|
+
"deployment status",
|
|
674
|
+
statusesResponse.status,
|
|
675
|
+
statusesBody
|
|
676
|
+
);
|
|
677
|
+
}
|
|
678
|
+
const providerStatus = z2.array(providerStatusSchema).parse(statusesBody)[0];
|
|
679
|
+
deployment = {
|
|
680
|
+
createdAt: providerDeployment.created_at,
|
|
681
|
+
creator: providerDeployment.creator?.login ?? null,
|
|
682
|
+
description: providerDeployment.description,
|
|
683
|
+
environment: providerDeployment.environment,
|
|
684
|
+
id: providerDeployment.id,
|
|
685
|
+
latestStatus: providerStatus ? {
|
|
686
|
+
createdAt: providerStatus.created_at,
|
|
687
|
+
creator: providerStatus.creator?.login ?? null,
|
|
688
|
+
description: providerStatus.description ?? null,
|
|
689
|
+
environmentUrl: providerStatus.environment_url ?? null,
|
|
690
|
+
id: providerStatus.id,
|
|
691
|
+
logUrl: providerStatus.log_url ?? null,
|
|
692
|
+
state: providerStatus.state
|
|
693
|
+
} : null,
|
|
694
|
+
ref: providerDeployment.ref,
|
|
695
|
+
sha: providerDeployment.sha.toLowerCase(),
|
|
696
|
+
updatedAt: providerDeployment.updated_at,
|
|
697
|
+
url: `https://github.com/${repo.ref}/deployments`
|
|
698
|
+
};
|
|
699
|
+
}
|
|
700
|
+
const subscribable = gitHubDeploymentSourceSubscribable({
|
|
701
|
+
commitSha,
|
|
702
|
+
environment: input.environment,
|
|
703
|
+
repo: repo.ref
|
|
704
|
+
});
|
|
705
|
+
const data = {
|
|
706
|
+
commitSha,
|
|
707
|
+
deployment,
|
|
708
|
+
environment: input.environment,
|
|
709
|
+
repo: repo.ref,
|
|
710
|
+
...subscribable ? { subscribable } : {}
|
|
711
|
+
};
|
|
712
|
+
return {
|
|
713
|
+
data,
|
|
714
|
+
ok: true,
|
|
715
|
+
status: "success",
|
|
716
|
+
target: "getDeployment",
|
|
717
|
+
...data
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
// src/tools/create-pull-request.ts
|
|
724
|
+
import {
|
|
725
|
+
definePluginTool as definePluginTool3,
|
|
726
|
+
EgressAuthRequired as EgressAuthRequired2,
|
|
727
|
+
PluginToolInputError as PluginToolInputError4,
|
|
728
|
+
pluginToolResultSchema as pluginToolResultSchema3
|
|
514
729
|
} from "@sentry/junior-plugin-api";
|
|
515
730
|
import { Type as Type2 } from "@sinclair/typebox";
|
|
516
731
|
import { Value as Value2 } from "@sinclair/typebox/value";
|
|
517
|
-
import { z as
|
|
518
|
-
import { subscribableResourceSchema } from "@sentry/junior-plugin-api";
|
|
732
|
+
import { z as z3 } from "zod";
|
|
733
|
+
import { subscribableResourceSchema as subscribableResourceSchema2 } from "@sentry/junior-plugin-api";
|
|
519
734
|
var GITHUB_PULL_REQUEST_CREATE_IDEMPOTENCY_TTL_MS = 30 * 24 * 60 * 60 * 1e3;
|
|
520
735
|
var GITHUB_PULL_REQUEST_CREATE_LOCK_TTL_MS = 6e4;
|
|
521
|
-
var RESOURCE_LINK_LABEL_MAX_LENGTH = 256;
|
|
522
736
|
var GitHubPullRequestCreateRejectedError = class extends Error {
|
|
523
737
|
status;
|
|
524
738
|
constructor(message, status) {
|
|
@@ -554,13 +768,13 @@ var createPullRequestInputSchema = Type2.Object(
|
|
|
554
768
|
},
|
|
555
769
|
{ additionalProperties: false }
|
|
556
770
|
);
|
|
557
|
-
var createPullRequestToolInputSchema =
|
|
558
|
-
repo:
|
|
559
|
-
title:
|
|
560
|
-
head:
|
|
561
|
-
base:
|
|
562
|
-
body:
|
|
563
|
-
draft:
|
|
771
|
+
var createPullRequestToolInputSchema = z3.object({
|
|
772
|
+
repo: z3.string().describe('Repository in "owner/name" format.'),
|
|
773
|
+
title: z3.string().describe("Pull request title."),
|
|
774
|
+
head: z3.string().describe("Head branch or owner:branch ref."),
|
|
775
|
+
base: z3.string().describe("Base branch."),
|
|
776
|
+
body: z3.string().describe("Pull request body. Junior appends the conversation footer.").optional(),
|
|
777
|
+
draft: z3.boolean().describe("Whether to open the pull request as a draft.").optional()
|
|
564
778
|
}).strict();
|
|
565
779
|
var createPullRequestStateSchema = Type2.Union([
|
|
566
780
|
Type2.Object(
|
|
@@ -582,40 +796,40 @@ var createPullRequestStateSchema = Type2.Union([
|
|
|
582
796
|
{ additionalProperties: false }
|
|
583
797
|
)
|
|
584
798
|
]);
|
|
585
|
-
var gitHubPullRequestDataSchema =
|
|
586
|
-
number:
|
|
587
|
-
url:
|
|
588
|
-
subscribable:
|
|
799
|
+
var gitHubPullRequestDataSchema = z3.object({
|
|
800
|
+
number: z3.number(),
|
|
801
|
+
url: z3.string(),
|
|
802
|
+
subscribable: subscribableResourceSchema2.optional()
|
|
589
803
|
});
|
|
590
|
-
var gitHubPullRequestOutputSchema =
|
|
591
|
-
ok:
|
|
592
|
-
status:
|
|
593
|
-
target:
|
|
804
|
+
var gitHubPullRequestOutputSchema = pluginToolResultSchema3.extend({
|
|
805
|
+
ok: z3.literal(true),
|
|
806
|
+
status: z3.literal("success"),
|
|
807
|
+
target: z3.literal("createPullRequest"),
|
|
594
808
|
data: gitHubPullRequestDataSchema,
|
|
595
|
-
number:
|
|
596
|
-
url:
|
|
597
|
-
subscribable:
|
|
809
|
+
number: z3.number(),
|
|
810
|
+
url: z3.string(),
|
|
811
|
+
subscribable: subscribableResourceSchema2.optional()
|
|
598
812
|
});
|
|
599
813
|
function parseCreatePullRequestInput(input) {
|
|
600
814
|
try {
|
|
601
815
|
return Value2.Parse(createPullRequestInputSchema, input);
|
|
602
816
|
} catch (error) {
|
|
603
|
-
throw new
|
|
817
|
+
throw new PluginToolInputError4("Invalid GitHub createPullRequest input.", {
|
|
604
818
|
cause: error
|
|
605
819
|
});
|
|
606
820
|
}
|
|
607
821
|
}
|
|
608
822
|
function nonEmptyString3(value, name) {
|
|
609
823
|
if (!value?.trim()) {
|
|
610
|
-
throw new
|
|
824
|
+
throw new PluginToolInputError4(`${name} is required`);
|
|
611
825
|
}
|
|
612
826
|
return value.trim();
|
|
613
827
|
}
|
|
614
|
-
function
|
|
828
|
+
function parseRepo3(value) {
|
|
615
829
|
const repo = nonEmptyString3(value, "repo");
|
|
616
830
|
const parts = repo.split("/");
|
|
617
831
|
if (parts.length !== 2 || !parts[0]?.trim() || !parts[1]?.trim()) {
|
|
618
|
-
throw new
|
|
832
|
+
throw new PluginToolInputError4('repo must use "owner/name" format');
|
|
619
833
|
}
|
|
620
834
|
return {
|
|
621
835
|
owner: parts[0].trim(),
|
|
@@ -685,7 +899,7 @@ function isDefinitiveGitHubPullRequestCreateRejection(error) {
|
|
|
685
899
|
return [400, 401, 404, 410, 422].includes(error.status);
|
|
686
900
|
}
|
|
687
901
|
function createGitHubPullRequestRequest(conversationId, input, actor, dashboardUrl) {
|
|
688
|
-
const repo =
|
|
902
|
+
const repo = parseRepo3(input.repo);
|
|
689
903
|
const payload = {
|
|
690
904
|
title: nonEmptyString3(input.title, "title"),
|
|
691
905
|
head: nonEmptyString3(input.head, "head"),
|
|
@@ -744,7 +958,7 @@ async function createGitHubPullRequest(ctx, request) {
|
|
|
744
958
|
};
|
|
745
959
|
}
|
|
746
960
|
function gitHubPullRequestToolResult(input, result) {
|
|
747
|
-
const repo =
|
|
961
|
+
const repo = parseRepo3(input.repo);
|
|
748
962
|
const subscribable = gitHubPullRequestSubscribable({
|
|
749
963
|
number: result.number,
|
|
750
964
|
repo: `${repo.owner}/${repo.name}`
|
|
@@ -752,15 +966,11 @@ function gitHubPullRequestToolResult(input, result) {
|
|
|
752
966
|
return { ...result, ...subscribable ? { subscribable } : {} };
|
|
753
967
|
}
|
|
754
968
|
async function annotatePullRequest(ctx, input, result) {
|
|
755
|
-
const repo =
|
|
756
|
-
const label = `${repo.owner}/${repo.name} #${result.number}: ${nonEmptyString3(input.title, "title")}`.slice(
|
|
757
|
-
0,
|
|
758
|
-
RESOURCE_LINK_LABEL_MAX_LENGTH
|
|
759
|
-
);
|
|
969
|
+
const repo = parseRepo3(input.repo);
|
|
760
970
|
await ctx.annotations?.upsert({
|
|
761
971
|
kind: "resource_link",
|
|
762
972
|
key: `${repo.owner.toLowerCase()}/${repo.name.toLowerCase()}#${result.number}`,
|
|
763
|
-
label
|
|
973
|
+
label: `${repo.owner}/${repo.name}#${result.number}`,
|
|
764
974
|
url: result.url,
|
|
765
975
|
status: input.draft ? "draft" : "open"
|
|
766
976
|
});
|
|
@@ -776,7 +986,7 @@ function gitHubPullRequestStructuredResult(input, result) {
|
|
|
776
986
|
};
|
|
777
987
|
}
|
|
778
988
|
function createGitHubPullRequestTool(ctx) {
|
|
779
|
-
return
|
|
989
|
+
return definePluginTool3({
|
|
780
990
|
description: "Create a GitHub pull request with a runtime-owned Junior conversation footer. Use this instead of shelling out to gh pr create when creating pull requests.",
|
|
781
991
|
inputSchema: createPullRequestToolInputSchema,
|
|
782
992
|
outputSchema: gitHubPullRequestOutputSchema,
|
|
@@ -857,42 +1067,42 @@ function createGitHubPullRequestTool(ctx) {
|
|
|
857
1067
|
|
|
858
1068
|
// src/tools/get-pull-request.ts
|
|
859
1069
|
import {
|
|
860
|
-
definePluginTool as
|
|
861
|
-
PluginToolInputError as
|
|
862
|
-
pluginToolResultSchema as
|
|
1070
|
+
definePluginTool as definePluginTool4,
|
|
1071
|
+
PluginToolInputError as PluginToolInputError5,
|
|
1072
|
+
pluginToolResultSchema as pluginToolResultSchema4
|
|
863
1073
|
} from "@sentry/junior-plugin-api";
|
|
864
|
-
import { z as
|
|
865
|
-
import { subscribableResourceSchema as
|
|
866
|
-
var
|
|
867
|
-
repo:
|
|
868
|
-
number:
|
|
1074
|
+
import { z as z4 } from "zod";
|
|
1075
|
+
import { subscribableResourceSchema as subscribableResourceSchema3 } from "@sentry/junior-plugin-api";
|
|
1076
|
+
var inputSchema2 = z4.object({
|
|
1077
|
+
repo: z4.string().describe('Repository in "owner/name" format.'),
|
|
1078
|
+
number: z4.number().int().positive().describe("Pull request number.")
|
|
869
1079
|
}).strict();
|
|
870
|
-
var pullRequestSchema =
|
|
871
|
-
base:
|
|
872
|
-
draft:
|
|
873
|
-
head:
|
|
874
|
-
merged:
|
|
875
|
-
number:
|
|
876
|
-
state:
|
|
877
|
-
subscribable:
|
|
878
|
-
title:
|
|
879
|
-
url:
|
|
1080
|
+
var pullRequestSchema = z4.object({
|
|
1081
|
+
base: z4.string(),
|
|
1082
|
+
draft: z4.boolean(),
|
|
1083
|
+
head: z4.string(),
|
|
1084
|
+
merged: z4.boolean(),
|
|
1085
|
+
number: z4.number(),
|
|
1086
|
+
state: z4.string(),
|
|
1087
|
+
subscribable: subscribableResourceSchema3.optional(),
|
|
1088
|
+
title: z4.string(),
|
|
1089
|
+
url: z4.string()
|
|
880
1090
|
});
|
|
881
|
-
var
|
|
882
|
-
ok:
|
|
883
|
-
status:
|
|
884
|
-
target:
|
|
1091
|
+
var outputSchema2 = pluginToolResultSchema4.extend({
|
|
1092
|
+
ok: z4.literal(true),
|
|
1093
|
+
status: z4.literal("success"),
|
|
1094
|
+
target: z4.literal("getPullRequest"),
|
|
885
1095
|
data: pullRequestSchema,
|
|
886
1096
|
...pullRequestSchema.shape
|
|
887
1097
|
});
|
|
888
|
-
function
|
|
1098
|
+
function parseRepo4(value) {
|
|
889
1099
|
const parts = value.split("/").map((part) => part.trim());
|
|
890
1100
|
if (parts.length !== 2 || !parts[0] || !parts[1]) {
|
|
891
|
-
throw new
|
|
1101
|
+
throw new PluginToolInputError5('repo must use "owner/name" format');
|
|
892
1102
|
}
|
|
893
1103
|
return { owner: parts[0], name: parts[1], ref: `${parts[0]}/${parts[1]}` };
|
|
894
1104
|
}
|
|
895
|
-
async function
|
|
1105
|
+
async function readJson2(response) {
|
|
896
1106
|
const text2 = await response.text();
|
|
897
1107
|
if (!text2) return void 0;
|
|
898
1108
|
try {
|
|
@@ -902,12 +1112,12 @@ async function readJson(response) {
|
|
|
902
1112
|
}
|
|
903
1113
|
}
|
|
904
1114
|
function createGitHubGetPullRequestTool(ctx) {
|
|
905
|
-
return
|
|
1115
|
+
return definePluginTool4({
|
|
906
1116
|
description: "Get a GitHub pull request. Use this when an existing PR may need resource-event monitoring; the result includes a subscribable hint when GitHub webhooks are configured.",
|
|
907
|
-
inputSchema,
|
|
908
|
-
outputSchema,
|
|
1117
|
+
inputSchema: inputSchema2,
|
|
1118
|
+
outputSchema: outputSchema2,
|
|
909
1119
|
async execute(input) {
|
|
910
|
-
const repo =
|
|
1120
|
+
const repo = parseRepo4(input.repo);
|
|
911
1121
|
const response = await ctx.egress.fetch({
|
|
912
1122
|
provider: "github",
|
|
913
1123
|
operation: "github.pull.get",
|
|
@@ -921,20 +1131,20 @@ function createGitHubGetPullRequestTool(ctx) {
|
|
|
921
1131
|
}
|
|
922
1132
|
)
|
|
923
1133
|
});
|
|
924
|
-
const parsed = await
|
|
1134
|
+
const parsed = await readJson2(response);
|
|
925
1135
|
if (!response.ok)
|
|
926
1136
|
throw new Error(
|
|
927
1137
|
`GitHub pull request lookup failed with HTTP ${response.status}`
|
|
928
1138
|
);
|
|
929
|
-
const providerResult =
|
|
930
|
-
base:
|
|
931
|
-
draft:
|
|
932
|
-
head:
|
|
933
|
-
html_url:
|
|
934
|
-
merged:
|
|
935
|
-
number:
|
|
936
|
-
state:
|
|
937
|
-
title:
|
|
1139
|
+
const providerResult = z4.object({
|
|
1140
|
+
base: z4.object({ ref: z4.string() }),
|
|
1141
|
+
draft: z4.boolean(),
|
|
1142
|
+
head: z4.object({ ref: z4.string() }),
|
|
1143
|
+
html_url: z4.string(),
|
|
1144
|
+
merged: z4.boolean().optional().default(false),
|
|
1145
|
+
number: z4.number(),
|
|
1146
|
+
state: z4.string(),
|
|
1147
|
+
title: z4.string()
|
|
938
1148
|
}).parse(parsed);
|
|
939
1149
|
const subscribable = gitHubPullRequestSubscribable({
|
|
940
1150
|
number: providerResult.number,
|
|
@@ -964,56 +1174,56 @@ function createGitHubGetPullRequestTool(ctx) {
|
|
|
964
1174
|
|
|
965
1175
|
// src/tools/update-pull-request.ts
|
|
966
1176
|
import {
|
|
967
|
-
definePluginTool as
|
|
968
|
-
PluginToolInputError as
|
|
969
|
-
pluginToolResultSchema as
|
|
1177
|
+
definePluginTool as definePluginTool5,
|
|
1178
|
+
PluginToolInputError as PluginToolInputError6,
|
|
1179
|
+
pluginToolResultSchema as pluginToolResultSchema5
|
|
970
1180
|
} from "@sentry/junior-plugin-api";
|
|
971
|
-
import { z as
|
|
972
|
-
import { subscribableResourceSchema as
|
|
973
|
-
var
|
|
974
|
-
repo:
|
|
975
|
-
number:
|
|
976
|
-
title:
|
|
977
|
-
body:
|
|
1181
|
+
import { z as z5 } from "zod";
|
|
1182
|
+
import { subscribableResourceSchema as subscribableResourceSchema4 } from "@sentry/junior-plugin-api";
|
|
1183
|
+
var inputSchema3 = z5.object({
|
|
1184
|
+
repo: z5.string().describe('Repository in "owner/name" format.'),
|
|
1185
|
+
number: z5.number().int().positive().describe("Pull request number."),
|
|
1186
|
+
title: z5.string().trim().min(1).optional().describe("Replacement pull request title."),
|
|
1187
|
+
body: z5.string().optional().describe(
|
|
978
1188
|
"Replacement pull request body. Junior appends requester attribution and the conversation footer."
|
|
979
1189
|
),
|
|
980
|
-
base:
|
|
981
|
-
state:
|
|
1190
|
+
base: z5.string().trim().min(1).optional().describe("Replacement base branch."),
|
|
1191
|
+
state: z5.enum(["open", "closed"]).optional().describe("Replacement pull request state.")
|
|
982
1192
|
}).strict().refine(
|
|
983
1193
|
({ title, body, base, state }) => title !== void 0 || body !== void 0 || base !== void 0 || state !== void 0,
|
|
984
1194
|
{ message: "At least one pull request field must be provided." }
|
|
985
1195
|
);
|
|
986
|
-
var pullRequestSchema2 =
|
|
987
|
-
base:
|
|
988
|
-
body:
|
|
989
|
-
draft:
|
|
990
|
-
number:
|
|
991
|
-
state:
|
|
992
|
-
subscribable:
|
|
993
|
-
title:
|
|
994
|
-
url:
|
|
1196
|
+
var pullRequestSchema2 = z5.object({
|
|
1197
|
+
base: z5.string(),
|
|
1198
|
+
body: z5.string().nullable(),
|
|
1199
|
+
draft: z5.boolean(),
|
|
1200
|
+
number: z5.number(),
|
|
1201
|
+
state: z5.string(),
|
|
1202
|
+
subscribable: subscribableResourceSchema4.optional(),
|
|
1203
|
+
title: z5.string(),
|
|
1204
|
+
url: z5.string()
|
|
995
1205
|
});
|
|
996
|
-
var
|
|
997
|
-
ok:
|
|
998
|
-
status:
|
|
999
|
-
target:
|
|
1206
|
+
var outputSchema3 = pluginToolResultSchema5.extend({
|
|
1207
|
+
ok: z5.literal(true),
|
|
1208
|
+
status: z5.literal("success"),
|
|
1209
|
+
target: z5.literal("updatePullRequest"),
|
|
1000
1210
|
data: pullRequestSchema2,
|
|
1001
1211
|
...pullRequestSchema2.shape
|
|
1002
1212
|
});
|
|
1003
1213
|
function nonEmptyString4(value, name) {
|
|
1004
1214
|
if (!value?.trim()) {
|
|
1005
|
-
throw new
|
|
1215
|
+
throw new PluginToolInputError6(`${name} is required`);
|
|
1006
1216
|
}
|
|
1007
1217
|
return value.trim();
|
|
1008
1218
|
}
|
|
1009
|
-
function
|
|
1219
|
+
function parseRepo5(value) {
|
|
1010
1220
|
const parts = value.split("/").map((part) => part.trim());
|
|
1011
1221
|
if (parts.length !== 2 || !parts[0] || !parts[1]) {
|
|
1012
|
-
throw new
|
|
1222
|
+
throw new PluginToolInputError6('repo must use "owner/name" format');
|
|
1013
1223
|
}
|
|
1014
1224
|
return { owner: parts[0], name: parts[1], ref: `${parts[0]}/${parts[1]}` };
|
|
1015
1225
|
}
|
|
1016
|
-
async function
|
|
1226
|
+
async function readJson3(response) {
|
|
1017
1227
|
const text2 = await response.text();
|
|
1018
1228
|
if (!text2) return void 0;
|
|
1019
1229
|
try {
|
|
@@ -1031,20 +1241,20 @@ function githubApiErrorMessage3(payload) {
|
|
|
1031
1241
|
return "GitHub request failed";
|
|
1032
1242
|
}
|
|
1033
1243
|
function createGitHubUpdatePullRequestTool(ctx) {
|
|
1034
|
-
return
|
|
1244
|
+
return definePluginTool5({
|
|
1035
1245
|
description: "Update an existing GitHub pull request's title, body, base branch, or open/closed state. Use this instead of raw GitHub API calls when changing PR metadata.",
|
|
1036
|
-
inputSchema:
|
|
1037
|
-
outputSchema:
|
|
1246
|
+
inputSchema: inputSchema3,
|
|
1247
|
+
outputSchema: outputSchema3,
|
|
1038
1248
|
async execute(input) {
|
|
1039
|
-
const parsedInput =
|
|
1249
|
+
const parsedInput = inputSchema3.safeParse(input);
|
|
1040
1250
|
if (!parsedInput.success) {
|
|
1041
|
-
throw new
|
|
1251
|
+
throw new PluginToolInputError6(
|
|
1042
1252
|
"Invalid GitHub updatePullRequest input.",
|
|
1043
1253
|
{ cause: parsedInput.error }
|
|
1044
1254
|
);
|
|
1045
1255
|
}
|
|
1046
1256
|
const update = parsedInput.data;
|
|
1047
|
-
const repo =
|
|
1257
|
+
const repo = parseRepo5(update.repo);
|
|
1048
1258
|
const payload = {
|
|
1049
1259
|
...update.title !== void 0 ? { title: update.title } : {},
|
|
1050
1260
|
...update.body !== void 0 ? {
|
|
@@ -1073,20 +1283,20 @@ function createGitHubUpdatePullRequestTool(ctx) {
|
|
|
1073
1283
|
}
|
|
1074
1284
|
)
|
|
1075
1285
|
});
|
|
1076
|
-
const parsed = await
|
|
1286
|
+
const parsed = await readJson3(response);
|
|
1077
1287
|
if (!response.ok) {
|
|
1078
1288
|
throw new Error(
|
|
1079
1289
|
`GitHub pull request update failed with HTTP ${response.status}: ${githubApiErrorMessage3(parsed)}`
|
|
1080
1290
|
);
|
|
1081
1291
|
}
|
|
1082
|
-
const providerResult =
|
|
1083
|
-
base:
|
|
1084
|
-
body:
|
|
1085
|
-
draft:
|
|
1086
|
-
html_url:
|
|
1087
|
-
number:
|
|
1088
|
-
state:
|
|
1089
|
-
title:
|
|
1292
|
+
const providerResult = z5.object({
|
|
1293
|
+
base: z5.object({ ref: z5.string() }),
|
|
1294
|
+
body: z5.string().nullable().optional().default(null),
|
|
1295
|
+
draft: z5.boolean(),
|
|
1296
|
+
html_url: z5.string(),
|
|
1297
|
+
number: z5.number(),
|
|
1298
|
+
state: z5.string(),
|
|
1299
|
+
title: z5.string()
|
|
1090
1300
|
}).parse(parsed);
|
|
1091
1301
|
const subscribable = gitHubPullRequestSubscribable({
|
|
1092
1302
|
number: providerResult.number,
|
|
@@ -1118,6 +1328,7 @@ function createGitHubTools(ctx) {
|
|
|
1118
1328
|
return {
|
|
1119
1329
|
createIssue: createGitHubIssueTool(ctx),
|
|
1120
1330
|
createPullRequest: createGitHubPullRequestTool(ctx),
|
|
1331
|
+
getDeployment: createGitHubGetDeploymentTool(ctx),
|
|
1121
1332
|
getPullRequest: createGitHubGetPullRequestTool(ctx),
|
|
1122
1333
|
updatePullRequest: createGitHubUpdatePullRequestTool(ctx)
|
|
1123
1334
|
};
|
|
@@ -1128,7 +1339,7 @@ import { createHmac, timingSafeEqual } from "crypto";
|
|
|
1128
1339
|
|
|
1129
1340
|
// src/issue-outcomes/store.ts
|
|
1130
1341
|
import { and, eq, lte, sql as sql2 } from "drizzle-orm";
|
|
1131
|
-
import { z as
|
|
1342
|
+
import { z as z7 } from "zod";
|
|
1132
1343
|
|
|
1133
1344
|
// src/db/schema.ts
|
|
1134
1345
|
import { sql } from "drizzle-orm";
|
|
@@ -1140,18 +1351,18 @@ import {
|
|
|
1140
1351
|
text,
|
|
1141
1352
|
timestamp
|
|
1142
1353
|
} from "drizzle-orm/pg-core";
|
|
1143
|
-
import { z as
|
|
1144
|
-
var githubPullRequestStateSchema =
|
|
1354
|
+
import { z as z6 } from "zod";
|
|
1355
|
+
var githubPullRequestStateSchema = z6.enum([
|
|
1145
1356
|
"closed_unmerged",
|
|
1146
1357
|
"merged",
|
|
1147
1358
|
"open"
|
|
1148
1359
|
]);
|
|
1149
|
-
var githubPullRequestCommitCompositionSchema =
|
|
1360
|
+
var githubPullRequestCommitCompositionSchema = z6.enum([
|
|
1150
1361
|
"junior_only",
|
|
1151
1362
|
"mixed"
|
|
1152
1363
|
]);
|
|
1153
|
-
var githubIssueStateSchema =
|
|
1154
|
-
var githubIssueStateReasonSchema =
|
|
1364
|
+
var githubIssueStateSchema = z6.enum(["closed", "open"]);
|
|
1365
|
+
var githubIssueStateReasonSchema = z6.enum([
|
|
1155
1366
|
"completed",
|
|
1156
1367
|
"duplicate",
|
|
1157
1368
|
"not_planned",
|
|
@@ -1220,21 +1431,21 @@ var juniorGitHubPullRequestIssues = pgTable(
|
|
|
1220
1431
|
);
|
|
1221
1432
|
|
|
1222
1433
|
// src/issue-outcomes/store.ts
|
|
1223
|
-
var githubIssueOutcomeInputSchema =
|
|
1224
|
-
candidateOwned:
|
|
1225
|
-
closedAt:
|
|
1226
|
-
issueId:
|
|
1227
|
-
number:
|
|
1228
|
-
openedAt:
|
|
1229
|
-
repositoryFullName:
|
|
1230
|
-
repositoryId:
|
|
1434
|
+
var githubIssueOutcomeInputSchema = z7.object({
|
|
1435
|
+
candidateOwned: z7.boolean(),
|
|
1436
|
+
closedAt: z7.date().optional(),
|
|
1437
|
+
issueId: z7.string().min(1),
|
|
1438
|
+
number: z7.number().int().positive(),
|
|
1439
|
+
openedAt: z7.date(),
|
|
1440
|
+
repositoryFullName: z7.string().min(1),
|
|
1441
|
+
repositoryId: z7.string().min(1),
|
|
1231
1442
|
state: githubIssueStateSchema,
|
|
1232
1443
|
stateReason: githubIssueStateReasonSchema.optional(),
|
|
1233
|
-
updatedAt:
|
|
1444
|
+
updatedAt: z7.date()
|
|
1234
1445
|
}).strict();
|
|
1235
|
-
var githubIssueConversationsInputSchema =
|
|
1236
|
-
conversationIds:
|
|
1237
|
-
issueId:
|
|
1446
|
+
var githubIssueConversationsInputSchema = z7.object({
|
|
1447
|
+
conversationIds: z7.array(z7.string().min(1)).min(1),
|
|
1448
|
+
issueId: z7.string().min(1)
|
|
1238
1449
|
}).strict();
|
|
1239
1450
|
function projectionValues(input) {
|
|
1240
1451
|
return {
|
|
@@ -1287,32 +1498,32 @@ async function recordGitHubIssueConversations(db, input) {
|
|
|
1287
1498
|
|
|
1288
1499
|
// src/pull-request-outcomes/store.ts
|
|
1289
1500
|
import { and as and2, eq as eq2, lte as lte2, sql as sql3 } from "drizzle-orm";
|
|
1290
|
-
import { z as
|
|
1291
|
-
var githubPullRequestOutcomeInputSchema =
|
|
1292
|
-
candidateOwned:
|
|
1293
|
-
closedAt:
|
|
1501
|
+
import { z as z8 } from "zod";
|
|
1502
|
+
var githubPullRequestOutcomeInputSchema = z8.object({
|
|
1503
|
+
candidateOwned: z8.boolean(),
|
|
1504
|
+
closedAt: z8.date().optional(),
|
|
1294
1505
|
commitComposition: githubPullRequestCommitCompositionSchema.optional(),
|
|
1295
|
-
mergedAt:
|
|
1296
|
-
number:
|
|
1297
|
-
openedAt:
|
|
1298
|
-
pullRequestId:
|
|
1299
|
-
repositoryFullName:
|
|
1300
|
-
repositoryId:
|
|
1506
|
+
mergedAt: z8.date().optional(),
|
|
1507
|
+
number: z8.number().int().positive(),
|
|
1508
|
+
openedAt: z8.date(),
|
|
1509
|
+
pullRequestId: z8.string().min(1),
|
|
1510
|
+
repositoryFullName: z8.string().min(1),
|
|
1511
|
+
repositoryId: z8.string().min(1),
|
|
1301
1512
|
state: githubPullRequestStateSchema,
|
|
1302
|
-
updatedAt:
|
|
1513
|
+
updatedAt: z8.date()
|
|
1303
1514
|
}).strict();
|
|
1304
|
-
var githubPullRequestConversationsInputSchema =
|
|
1305
|
-
conversationIds:
|
|
1306
|
-
pullRequestId:
|
|
1515
|
+
var githubPullRequestConversationsInputSchema = z8.object({
|
|
1516
|
+
conversationIds: z8.array(z8.string().min(1)).min(1),
|
|
1517
|
+
pullRequestId: z8.string().min(1)
|
|
1307
1518
|
}).strict();
|
|
1308
|
-
var githubPullRequestLinkedIssuesInputSchema =
|
|
1309
|
-
linkedIssues:
|
|
1310
|
-
|
|
1311
|
-
number:
|
|
1312
|
-
repositoryFullName:
|
|
1519
|
+
var githubPullRequestLinkedIssuesInputSchema = z8.object({
|
|
1520
|
+
linkedIssues: z8.array(
|
|
1521
|
+
z8.object({
|
|
1522
|
+
number: z8.number().int().positive(),
|
|
1523
|
+
repositoryFullName: z8.string().min(1)
|
|
1313
1524
|
}).strict()
|
|
1314
1525
|
).min(1),
|
|
1315
|
-
pullRequestId:
|
|
1526
|
+
pullRequestId: z8.string().min(1)
|
|
1316
1527
|
}).strict();
|
|
1317
1528
|
function projectionValues2(input) {
|
|
1318
1529
|
return {
|
|
@@ -1402,7 +1613,7 @@ async function recordGitHubPullRequestLinkedIssues(db, input) {
|
|
|
1402
1613
|
}
|
|
1403
1614
|
|
|
1404
1615
|
// src/webhooks/issue-outcome.ts
|
|
1405
|
-
import { z as
|
|
1616
|
+
import { z as z9 } from "zod";
|
|
1406
1617
|
|
|
1407
1618
|
// src/webhooks/ownership.ts
|
|
1408
1619
|
var GITHUB_NOREPLY_DOMAIN = "users.noreply.github.com";
|
|
@@ -1419,38 +1630,38 @@ function botLoginFromEmail(value) {
|
|
|
1419
1630
|
}
|
|
1420
1631
|
|
|
1421
1632
|
// src/webhooks/issue-outcome.ts
|
|
1422
|
-
var canonicalIssueOutcomeSchema =
|
|
1423
|
-
action:
|
|
1424
|
-
issue:
|
|
1425
|
-
body:
|
|
1426
|
-
closed_at:
|
|
1427
|
-
created_at:
|
|
1428
|
-
id:
|
|
1429
|
-
number:
|
|
1633
|
+
var canonicalIssueOutcomeSchema = z9.object({
|
|
1634
|
+
action: z9.enum(["opened", "closed", "reopened"]),
|
|
1635
|
+
issue: z9.object({
|
|
1636
|
+
body: z9.string().nullable().optional(),
|
|
1637
|
+
closed_at: z9.string().nullable().optional(),
|
|
1638
|
+
created_at: z9.string(),
|
|
1639
|
+
id: z9.number().int().positive(),
|
|
1640
|
+
number: z9.number().int().positive(),
|
|
1430
1641
|
state_reason: githubIssueStateReasonSchema.nullable().optional(),
|
|
1431
|
-
updated_at:
|
|
1432
|
-
user:
|
|
1642
|
+
updated_at: z9.string(),
|
|
1643
|
+
user: z9.object({ login: z9.string().min(1) }).strict()
|
|
1433
1644
|
}).strict(),
|
|
1434
|
-
repository:
|
|
1435
|
-
full_name:
|
|
1436
|
-
id:
|
|
1645
|
+
repository: z9.object({
|
|
1646
|
+
full_name: z9.string().min(1),
|
|
1647
|
+
id: z9.number().int().positive()
|
|
1437
1648
|
}).strict()
|
|
1438
1649
|
}).strict();
|
|
1439
|
-
var issueOutcomeSchema =
|
|
1440
|
-
action:
|
|
1441
|
-
issue:
|
|
1442
|
-
body:
|
|
1443
|
-
closed_at:
|
|
1444
|
-
created_at:
|
|
1445
|
-
id:
|
|
1446
|
-
number:
|
|
1650
|
+
var issueOutcomeSchema = z9.object({
|
|
1651
|
+
action: z9.enum(["opened", "closed", "reopened"]),
|
|
1652
|
+
issue: z9.object({
|
|
1653
|
+
body: z9.string().nullable().optional(),
|
|
1654
|
+
closed_at: z9.string().nullable().optional(),
|
|
1655
|
+
created_at: z9.string(),
|
|
1656
|
+
id: z9.number().int().positive(),
|
|
1657
|
+
number: z9.number().int().positive(),
|
|
1447
1658
|
state_reason: githubIssueStateReasonSchema.nullable().optional(),
|
|
1448
|
-
updated_at:
|
|
1449
|
-
user:
|
|
1659
|
+
updated_at: z9.string(),
|
|
1660
|
+
user: z9.object({ login: z9.string().min(1) }).passthrough()
|
|
1450
1661
|
}).passthrough(),
|
|
1451
|
-
repository:
|
|
1452
|
-
full_name:
|
|
1453
|
-
id:
|
|
1662
|
+
repository: z9.object({
|
|
1663
|
+
full_name: z9.string().min(1),
|
|
1664
|
+
id: z9.number().int().positive()
|
|
1454
1665
|
}).passthrough()
|
|
1455
1666
|
}).passthrough().transform(
|
|
1456
1667
|
(provider) => canonicalIssueOutcomeSchema.parse({
|
|
@@ -1471,7 +1682,7 @@ var issueOutcomeSchema = z8.object({
|
|
|
1471
1682
|
}
|
|
1472
1683
|
})
|
|
1473
1684
|
);
|
|
1474
|
-
var issueLifecycleActionSchema =
|
|
1685
|
+
var issueLifecycleActionSchema = z9.object({ action: z9.string() }).passthrough();
|
|
1475
1686
|
function timestamp2(value) {
|
|
1476
1687
|
if (!value) return void 0;
|
|
1477
1688
|
const parsed = new Date(value);
|
|
@@ -1517,21 +1728,21 @@ function normalizeGitHubIssueOutcome(args) {
|
|
|
1517
1728
|
updatedAt
|
|
1518
1729
|
};
|
|
1519
1730
|
}
|
|
1520
|
-
var canonicalIssueConversationSchema =
|
|
1521
|
-
issue:
|
|
1522
|
-
body:
|
|
1523
|
-
id:
|
|
1524
|
-
user:
|
|
1731
|
+
var canonicalIssueConversationSchema = z9.object({
|
|
1732
|
+
issue: z9.object({
|
|
1733
|
+
body: z9.string().nullable().optional(),
|
|
1734
|
+
id: z9.number().int().positive(),
|
|
1735
|
+
user: z9.object({ login: z9.string().min(1) }).strict()
|
|
1525
1736
|
}).strict(),
|
|
1526
|
-
sender:
|
|
1737
|
+
sender: z9.object({ login: z9.string().min(1) }).strict().optional()
|
|
1527
1738
|
}).strict();
|
|
1528
|
-
var issueConversationSchema =
|
|
1529
|
-
issue:
|
|
1530
|
-
body:
|
|
1531
|
-
id:
|
|
1532
|
-
user:
|
|
1739
|
+
var issueConversationSchema = z9.object({
|
|
1740
|
+
issue: z9.object({
|
|
1741
|
+
body: z9.string().nullable().optional(),
|
|
1742
|
+
id: z9.number().int().positive(),
|
|
1743
|
+
user: z9.object({ login: z9.string().min(1) }).passthrough()
|
|
1533
1744
|
}).passthrough(),
|
|
1534
|
-
sender:
|
|
1745
|
+
sender: z9.object({ login: z9.string().min(1) }).passthrough().optional()
|
|
1535
1746
|
}).passthrough().transform(
|
|
1536
1747
|
(provider) => canonicalIssueConversationSchema.parse({
|
|
1537
1748
|
issue: {
|
|
@@ -1558,41 +1769,41 @@ function normalizeGitHubIssueConversations(args) {
|
|
|
1558
1769
|
}
|
|
1559
1770
|
|
|
1560
1771
|
// src/webhooks/pull-request-outcome.ts
|
|
1561
|
-
import { z as
|
|
1562
|
-
var canonicalPullRequestOutcomeSchema =
|
|
1563
|
-
action:
|
|
1564
|
-
pull_request:
|
|
1565
|
-
body:
|
|
1566
|
-
closed_at:
|
|
1567
|
-
created_at:
|
|
1568
|
-
id:
|
|
1569
|
-
merged:
|
|
1570
|
-
merged_at:
|
|
1571
|
-
number:
|
|
1572
|
-
updated_at:
|
|
1573
|
-
user:
|
|
1772
|
+
import { z as z10 } from "zod";
|
|
1773
|
+
var canonicalPullRequestOutcomeSchema = z10.object({
|
|
1774
|
+
action: z10.enum(["opened", "closed", "reopened"]),
|
|
1775
|
+
pull_request: z10.object({
|
|
1776
|
+
body: z10.string().nullable().optional(),
|
|
1777
|
+
closed_at: z10.string().nullable().optional(),
|
|
1778
|
+
created_at: z10.string(),
|
|
1779
|
+
id: z10.number().int().positive(),
|
|
1780
|
+
merged: z10.boolean(),
|
|
1781
|
+
merged_at: z10.string().nullable().optional(),
|
|
1782
|
+
number: z10.number().int().positive(),
|
|
1783
|
+
updated_at: z10.string(),
|
|
1784
|
+
user: z10.object({ login: z10.string().min(1) }).strict()
|
|
1574
1785
|
}).strict(),
|
|
1575
|
-
repository:
|
|
1576
|
-
full_name:
|
|
1577
|
-
id:
|
|
1786
|
+
repository: z10.object({
|
|
1787
|
+
full_name: z10.string().min(1),
|
|
1788
|
+
id: z10.number().int().positive()
|
|
1578
1789
|
}).strict()
|
|
1579
1790
|
}).strict();
|
|
1580
|
-
var pullRequestOutcomeSchema =
|
|
1581
|
-
action:
|
|
1582
|
-
pull_request:
|
|
1583
|
-
body:
|
|
1584
|
-
closed_at:
|
|
1585
|
-
created_at:
|
|
1586
|
-
id:
|
|
1587
|
-
merged:
|
|
1588
|
-
merged_at:
|
|
1589
|
-
number:
|
|
1590
|
-
updated_at:
|
|
1591
|
-
user:
|
|
1791
|
+
var pullRequestOutcomeSchema = z10.object({
|
|
1792
|
+
action: z10.enum(["opened", "closed", "reopened"]),
|
|
1793
|
+
pull_request: z10.object({
|
|
1794
|
+
body: z10.string().nullable().optional(),
|
|
1795
|
+
closed_at: z10.string().nullable().optional(),
|
|
1796
|
+
created_at: z10.string(),
|
|
1797
|
+
id: z10.number().int().positive(),
|
|
1798
|
+
merged: z10.boolean(),
|
|
1799
|
+
merged_at: z10.string().nullable().optional(),
|
|
1800
|
+
number: z10.number().int().positive(),
|
|
1801
|
+
updated_at: z10.string(),
|
|
1802
|
+
user: z10.object({ login: z10.string().min(1) }).passthrough()
|
|
1592
1803
|
}).passthrough(),
|
|
1593
|
-
repository:
|
|
1594
|
-
full_name:
|
|
1595
|
-
id:
|
|
1804
|
+
repository: z10.object({
|
|
1805
|
+
full_name: z10.string().min(1),
|
|
1806
|
+
id: z10.number().int().positive()
|
|
1596
1807
|
}).passthrough()
|
|
1597
1808
|
}).passthrough().transform(
|
|
1598
1809
|
(provider) => canonicalPullRequestOutcomeSchema.parse({
|
|
@@ -1614,24 +1825,24 @@ var pullRequestOutcomeSchema = z9.object({
|
|
|
1614
1825
|
}
|
|
1615
1826
|
})
|
|
1616
1827
|
);
|
|
1617
|
-
var pullRequestLifecycleActionSchema =
|
|
1618
|
-
var canonicalPullRequestConversationSchema =
|
|
1619
|
-
pull_request:
|
|
1620
|
-
body:
|
|
1621
|
-
id:
|
|
1622
|
-
user:
|
|
1828
|
+
var pullRequestLifecycleActionSchema = z10.object({ action: z10.string() }).passthrough();
|
|
1829
|
+
var canonicalPullRequestConversationSchema = z10.object({
|
|
1830
|
+
pull_request: z10.object({
|
|
1831
|
+
body: z10.string().nullable().optional(),
|
|
1832
|
+
id: z10.number().int().positive(),
|
|
1833
|
+
user: z10.object({ login: z10.string().min(1) }).strict()
|
|
1623
1834
|
}).strict(),
|
|
1624
|
-
repository:
|
|
1625
|
-
sender:
|
|
1835
|
+
repository: z10.object({ full_name: z10.string().min(1) }).strict(),
|
|
1836
|
+
sender: z10.object({ login: z10.string().min(1) }).strict()
|
|
1626
1837
|
}).strict();
|
|
1627
|
-
var pullRequestConversationSchema =
|
|
1628
|
-
pull_request:
|
|
1629
|
-
body:
|
|
1630
|
-
id:
|
|
1631
|
-
user:
|
|
1838
|
+
var pullRequestConversationSchema = z10.object({
|
|
1839
|
+
pull_request: z10.object({
|
|
1840
|
+
body: z10.string().nullable().optional(),
|
|
1841
|
+
id: z10.number().int().positive(),
|
|
1842
|
+
user: z10.object({ login: z10.string().min(1) }).passthrough()
|
|
1632
1843
|
}).passthrough(),
|
|
1633
|
-
repository:
|
|
1634
|
-
sender:
|
|
1844
|
+
repository: z10.object({ full_name: z10.string().min(1) }).passthrough(),
|
|
1845
|
+
sender: z10.object({ login: z10.string().min(1) }).passthrough()
|
|
1635
1846
|
}).passthrough().transform(
|
|
1636
1847
|
(provider) => canonicalPullRequestConversationSchema.parse({
|
|
1637
1848
|
pull_request: {
|
|
@@ -1816,18 +2027,18 @@ function createGitHubWebhookRoute(args) {
|
|
|
1816
2027
|
|
|
1817
2028
|
// src/outcomes/report.ts
|
|
1818
2029
|
import { sql as sql5 } from "drizzle-orm";
|
|
1819
|
-
import { z as
|
|
2030
|
+
import { z as z12 } from "zod";
|
|
1820
2031
|
|
|
1821
2032
|
// src/outcomes/cost.ts
|
|
1822
2033
|
import { sql as sql4 } from "drizzle-orm";
|
|
1823
|
-
import { z as
|
|
2034
|
+
import { z as z11 } from "zod";
|
|
1824
2035
|
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
1825
|
-
var costWindowSchema =
|
|
1826
|
-
days:
|
|
1827
|
-
issueCostUsd:
|
|
1828
|
-
medianIssueCostUsd:
|
|
1829
|
-
medianPullRequestCostUsd:
|
|
1830
|
-
pullRequestCostUsd:
|
|
2036
|
+
var costWindowSchema = z11.object({
|
|
2037
|
+
days: z11.number().int().positive(),
|
|
2038
|
+
issueCostUsd: z11.number().nonnegative().nullable(),
|
|
2039
|
+
medianIssueCostUsd: z11.number().nonnegative().nullable(),
|
|
2040
|
+
medianPullRequestCostUsd: z11.number().nonnegative().nullable(),
|
|
2041
|
+
pullRequestCostUsd: z11.number().nonnegative().nullable()
|
|
1831
2042
|
}).strict().transform((row) => ({
|
|
1832
2043
|
days: row.days,
|
|
1833
2044
|
issueCostUsd: row.issueCostUsd ?? void 0,
|
|
@@ -1835,12 +2046,12 @@ var costWindowSchema = z10.object({
|
|
|
1835
2046
|
medianPullRequestCostUsd: row.medianPullRequestCostUsd ?? void 0,
|
|
1836
2047
|
pullRequestCostUsd: row.pullRequestCostUsd ?? void 0
|
|
1837
2048
|
}));
|
|
1838
|
-
var repositoryCostSchema =
|
|
1839
|
-
issueCostUsd:
|
|
1840
|
-
medianIssueCostUsd:
|
|
1841
|
-
medianPullRequestCostUsd:
|
|
1842
|
-
pullRequestCostUsd:
|
|
1843
|
-
repository:
|
|
2049
|
+
var repositoryCostSchema = z11.object({
|
|
2050
|
+
issueCostUsd: z11.number().nonnegative().nullable(),
|
|
2051
|
+
medianIssueCostUsd: z11.number().nonnegative().nullable(),
|
|
2052
|
+
medianPullRequestCostUsd: z11.number().nonnegative().nullable(),
|
|
2053
|
+
pullRequestCostUsd: z11.number().nonnegative().nullable(),
|
|
2054
|
+
repository: z11.string().min(1)
|
|
1844
2055
|
}).strict().transform((row) => ({
|
|
1845
2056
|
issueCostUsd: row.issueCostUsd ?? void 0,
|
|
1846
2057
|
medianIssueCostUsd: row.medianIssueCostUsd ?? void 0,
|
|
@@ -2045,7 +2256,7 @@ async function aggregateGitHubCostWindows(args) {
|
|
|
2045
2256
|
INNER JOIN issue_window ON issue_window.days = pull_request_window.days
|
|
2046
2257
|
ORDER BY pull_request_window.days
|
|
2047
2258
|
`);
|
|
2048
|
-
return
|
|
2259
|
+
return z11.array(costWindowSchema).parse(queryRows(result));
|
|
2049
2260
|
}
|
|
2050
2261
|
async function aggregateGitHubRepositoryCosts(args) {
|
|
2051
2262
|
if (!await hasConversationUsageTable(args.db)) {
|
|
@@ -2143,7 +2354,7 @@ async function aggregateGitHubRepositoryCosts(args) {
|
|
|
2143
2354
|
ON issue_totals.repository = repositories.repository
|
|
2144
2355
|
ORDER BY "repository" ASC
|
|
2145
2356
|
`);
|
|
2146
|
-
return
|
|
2357
|
+
return z11.array(repositoryCostSchema).parse(queryRows(result));
|
|
2147
2358
|
}
|
|
2148
2359
|
function formatCostUsd(value) {
|
|
2149
2360
|
if (value === void 0) return "\u2014";
|
|
@@ -2158,12 +2369,12 @@ function formatCostUsd(value) {
|
|
|
2158
2369
|
// src/outcomes/report.ts
|
|
2159
2370
|
var DAY_MS2 = 24 * 60 * 60 * 1e3;
|
|
2160
2371
|
var WINDOWS = [7, 30, 90];
|
|
2161
|
-
var pullRequestStatsSchema =
|
|
2162
|
-
closed:
|
|
2163
|
-
created:
|
|
2164
|
-
days:
|
|
2165
|
-
medianMergeTimeMs:
|
|
2166
|
-
merged:
|
|
2372
|
+
var pullRequestStatsSchema = z12.object({
|
|
2373
|
+
closed: z12.number().int().nonnegative(),
|
|
2374
|
+
created: z12.number().int().nonnegative(),
|
|
2375
|
+
days: z12.number().int().positive(),
|
|
2376
|
+
medianMergeTimeMs: z12.number().nonnegative().nullable(),
|
|
2377
|
+
merged: z12.number().int().nonnegative()
|
|
2167
2378
|
}).strict().transform((row) => {
|
|
2168
2379
|
const terminal = row.merged + row.closed;
|
|
2169
2380
|
return {
|
|
@@ -2172,12 +2383,12 @@ var pullRequestStatsSchema = z11.object({
|
|
|
2172
2383
|
mergeRate: terminal > 0 ? row.merged / terminal : void 0
|
|
2173
2384
|
};
|
|
2174
2385
|
});
|
|
2175
|
-
var pullRequestRepositoryStatsSchema =
|
|
2176
|
-
closed:
|
|
2177
|
-
created:
|
|
2178
|
-
juniorOnly:
|
|
2179
|
-
merged:
|
|
2180
|
-
repository:
|
|
2386
|
+
var pullRequestRepositoryStatsSchema = z12.object({
|
|
2387
|
+
closed: z12.number().int().nonnegative(),
|
|
2388
|
+
created: z12.number().int().nonnegative(),
|
|
2389
|
+
juniorOnly: z12.number().int().nonnegative(),
|
|
2390
|
+
merged: z12.number().int().nonnegative(),
|
|
2391
|
+
repository: z12.string().min(1)
|
|
2181
2392
|
}).strict().transform((row) => {
|
|
2182
2393
|
const terminal = row.merged + row.closed;
|
|
2183
2394
|
return {
|
|
@@ -2185,33 +2396,33 @@ var pullRequestRepositoryStatsSchema = z11.object({
|
|
|
2185
2396
|
mergeRate: terminal > 0 ? row.merged / terminal : void 0
|
|
2186
2397
|
};
|
|
2187
2398
|
});
|
|
2188
|
-
var issueStatsSchema =
|
|
2189
|
-
closedCompleted:
|
|
2190
|
-
closedDuplicate:
|
|
2191
|
-
closedNotPlanned:
|
|
2192
|
-
closedUnknown:
|
|
2193
|
-
created:
|
|
2194
|
-
days:
|
|
2195
|
-
medianCloseTimeMs:
|
|
2399
|
+
var issueStatsSchema = z12.object({
|
|
2400
|
+
closedCompleted: z12.number().int().nonnegative(),
|
|
2401
|
+
closedDuplicate: z12.number().int().nonnegative(),
|
|
2402
|
+
closedNotPlanned: z12.number().int().nonnegative(),
|
|
2403
|
+
closedUnknown: z12.number().int().nonnegative(),
|
|
2404
|
+
created: z12.number().int().nonnegative(),
|
|
2405
|
+
days: z12.number().int().positive(),
|
|
2406
|
+
medianCloseTimeMs: z12.number().nonnegative().nullable()
|
|
2196
2407
|
}).strict().transform((row) => ({
|
|
2197
2408
|
...row,
|
|
2198
2409
|
medianCloseTimeMs: row.medianCloseTimeMs ?? void 0
|
|
2199
2410
|
}));
|
|
2200
|
-
var pullRequestDaySchema =
|
|
2201
|
-
created:
|
|
2202
|
-
date:
|
|
2411
|
+
var pullRequestDaySchema = z12.object({
|
|
2412
|
+
created: z12.number().int().nonnegative(),
|
|
2413
|
+
date: z12.string().date()
|
|
2203
2414
|
}).strict();
|
|
2204
|
-
var issueDaySchema =
|
|
2205
|
-
created:
|
|
2206
|
-
date:
|
|
2415
|
+
var issueDaySchema = z12.object({
|
|
2416
|
+
created: z12.number().int().nonnegative(),
|
|
2417
|
+
date: z12.string().date()
|
|
2207
2418
|
}).strict();
|
|
2208
|
-
var issueRepositoryStatsSchema =
|
|
2209
|
-
closedCompleted:
|
|
2210
|
-
closedDuplicate:
|
|
2211
|
-
closedNotPlanned:
|
|
2212
|
-
closedUnknown:
|
|
2213
|
-
created:
|
|
2214
|
-
repository:
|
|
2419
|
+
var issueRepositoryStatsSchema = z12.object({
|
|
2420
|
+
closedCompleted: z12.number().int().nonnegative(),
|
|
2421
|
+
closedDuplicate: z12.number().int().nonnegative(),
|
|
2422
|
+
closedNotPlanned: z12.number().int().nonnegative(),
|
|
2423
|
+
closedUnknown: z12.number().int().nonnegative(),
|
|
2424
|
+
created: z12.number().int().nonnegative(),
|
|
2425
|
+
repository: z12.string().min(1)
|
|
2215
2426
|
}).strict();
|
|
2216
2427
|
function queryRows2(result) {
|
|
2217
2428
|
if (typeof result !== "object" || result === null || !("rows" in result) || !Array.isArray(result.rows)) {
|
|
@@ -2275,7 +2486,7 @@ async function aggregatePullRequestWindows(args) {
|
|
|
2275
2486
|
GROUP BY windows.days
|
|
2276
2487
|
ORDER BY windows.days
|
|
2277
2488
|
`);
|
|
2278
|
-
return
|
|
2489
|
+
return z12.array(pullRequestStatsSchema).parse(queryRows2(result));
|
|
2279
2490
|
}
|
|
2280
2491
|
async function aggregatePullRequestDays(args) {
|
|
2281
2492
|
const end = new Date(args.nowMs);
|
|
@@ -2303,7 +2514,7 @@ async function aggregatePullRequestDays(args) {
|
|
|
2303
2514
|
LEFT JOIN daily ON daily.day = days.day
|
|
2304
2515
|
ORDER BY days.day
|
|
2305
2516
|
`);
|
|
2306
|
-
return
|
|
2517
|
+
return z12.array(pullRequestDaySchema).parse(queryRows2(result));
|
|
2307
2518
|
}
|
|
2308
2519
|
async function aggregatePullRequestRepositories(args) {
|
|
2309
2520
|
const start = new Date(args.nowMs - 30 * DAY_MS2);
|
|
@@ -2333,7 +2544,7 @@ async function aggregatePullRequestRepositories(args) {
|
|
|
2333
2544
|
ORDER BY "merged" DESC, "created" DESC, "repository" ASC
|
|
2334
2545
|
LIMIT 25
|
|
2335
2546
|
`);
|
|
2336
|
-
return
|
|
2547
|
+
return z12.array(pullRequestRepositoryStatsSchema).parse(queryRows2(result));
|
|
2337
2548
|
}
|
|
2338
2549
|
async function aggregateIssueWindows(args) {
|
|
2339
2550
|
const starts = WINDOWS.map(
|
|
@@ -2402,7 +2613,7 @@ async function aggregateIssueWindows(args) {
|
|
|
2402
2613
|
GROUP BY windows.days
|
|
2403
2614
|
ORDER BY windows.days
|
|
2404
2615
|
`);
|
|
2405
|
-
return
|
|
2616
|
+
return z12.array(issueStatsSchema).parse(queryRows2(result));
|
|
2406
2617
|
}
|
|
2407
2618
|
async function aggregateIssueDays(args) {
|
|
2408
2619
|
const end = new Date(args.nowMs);
|
|
@@ -2430,7 +2641,7 @@ async function aggregateIssueDays(args) {
|
|
|
2430
2641
|
LEFT JOIN daily ON daily.day = days.day
|
|
2431
2642
|
ORDER BY days.day
|
|
2432
2643
|
`);
|
|
2433
|
-
return
|
|
2644
|
+
return z12.array(issueDaySchema).parse(queryRows2(result));
|
|
2434
2645
|
}
|
|
2435
2646
|
async function aggregateIssueRepositories(args) {
|
|
2436
2647
|
const start = new Date(args.nowMs - 30 * DAY_MS2);
|
|
@@ -2467,7 +2678,7 @@ async function aggregateIssueRepositories(args) {
|
|
|
2467
2678
|
ORDER BY "created" DESC, "closedCompleted" DESC, "repository" ASC
|
|
2468
2679
|
LIMIT 25
|
|
2469
2680
|
`);
|
|
2470
|
-
return
|
|
2681
|
+
return z12.array(issueRepositoryStatsSchema).parse(queryRows2(result));
|
|
2471
2682
|
}
|
|
2472
2683
|
function formatPercent(value) {
|
|
2473
2684
|
return value === void 0 ? "\u2014" : `${Math.round(value * 100)}%`;
|
|
@@ -2631,18 +2842,18 @@ async function buildGitHubOutcomeReport(args) {
|
|
|
2631
2842
|
}
|
|
2632
2843
|
|
|
2633
2844
|
// src/pull-request-outcomes/commit-composition.ts
|
|
2634
|
-
import { z as
|
|
2635
|
-
var canonicalCommitSchema =
|
|
2636
|
-
authorEmail:
|
|
2637
|
-
authorLogin:
|
|
2845
|
+
import { z as z13 } from "zod";
|
|
2846
|
+
var canonicalCommitSchema = z13.object({
|
|
2847
|
+
authorEmail: z13.string().nullable(),
|
|
2848
|
+
authorLogin: z13.string().nullable()
|
|
2638
2849
|
}).strict();
|
|
2639
|
-
var providerCommitSchema =
|
|
2640
|
-
author:
|
|
2641
|
-
commit:
|
|
2642
|
-
author:
|
|
2850
|
+
var providerCommitSchema = z13.object({
|
|
2851
|
+
author: z13.object({ login: z13.string() }).passthrough().nullable(),
|
|
2852
|
+
commit: z13.object({
|
|
2853
|
+
author: z13.object({ email: z13.string() }).passthrough().nullable()
|
|
2643
2854
|
}).passthrough()
|
|
2644
2855
|
}).passthrough();
|
|
2645
|
-
var commitPageSchema =
|
|
2856
|
+
var commitPageSchema = z13.array(providerCommitSchema).transform(
|
|
2646
2857
|
(commits) => commits.map(
|
|
2647
2858
|
(commit) => canonicalCommitSchema.parse({
|
|
2648
2859
|
authorEmail: commit.commit.author?.email ?? null,
|
|
@@ -3843,7 +4054,7 @@ function githubPlugin(options = {}) {
|
|
|
3843
4054
|
manifest: {
|
|
3844
4055
|
name: "github",
|
|
3845
4056
|
displayName: "GitHub",
|
|
3846
|
-
description: "GitHub issue, pull request, and repository workflows via GitHub App",
|
|
4057
|
+
description: "GitHub deployment, issue, pull request, and repository workflows via GitHub App",
|
|
3847
4058
|
configKeys: ["org", "repo"],
|
|
3848
4059
|
domains: ["api.github.com", "github.com", "uploads.github.com"],
|
|
3849
4060
|
envVars: {
|