@sentry/junior-github 0.257.0 → 0.258.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.
@@ -1281,10 +1281,12 @@ async function loadCheckSuiteFacts(args) {
1281
1281
  var GITHUB_BOT_NOREPLY_EMAIL = /^(?<userId>[1-9]\d*)\+(?<login>[^@]+\[bot\])@users\.noreply\.github\.com$/i;
1282
1282
  function parseGitHubBotIdentity(value) {
1283
1283
  const match = GITHUB_BOT_NOREPLY_EMAIL.exec(value?.trim() ?? "");
1284
- if (!match?.groups) return void 0;
1284
+ const login = match?.groups?.login;
1285
+ const userId = match?.groups?.userId;
1286
+ if (!login || !userId) return void 0;
1285
1287
  return {
1286
- login: match.groups.login,
1287
- userId: Number(match.groups.userId)
1288
+ login,
1289
+ userId: Number(userId)
1288
1290
  };
1289
1291
  }
1290
1292
  function botLoginFromEmail(value) {
@@ -1,8 +1,8 @@
1
1
  import { z } from "zod";
2
2
  export declare const githubPullRequestStateSchema: z.ZodEnum<{
3
+ closed_unmerged: "closed_unmerged";
3
4
  merged: "merged";
4
5
  open: "open";
5
- closed_unmerged: "closed_unmerged";
6
6
  }>;
7
7
  export type GitHubPullRequestState = z.output<typeof githubPullRequestStateSchema>;
8
8
  export declare const githubPullRequestCommitCompositionSchema: z.ZodEnum<{
@@ -168,8 +168,8 @@ export declare const juniorGitHubIssues: import("drizzle-orm/pg-core").PgTableWi
168
168
  }, {}, {
169
169
  baseBuilder: import("drizzle-orm/pg-core").PgColumnBuilder<{
170
170
  name: "conversation_ids";
171
- dataType: "string";
172
- columnType: "PgText";
171
+ dataType: 'string';
172
+ columnType: 'PgText';
173
173
  data: string;
174
174
  enumValues: [string, ...string[]];
175
175
  driverParam: string;
@@ -228,7 +228,7 @@ export declare const juniorGitHubIssues: import("drizzle-orm/pg-core").PgTableWi
228
228
  generated: undefined;
229
229
  }, {}, {}>;
230
230
  };
231
- dialect: "pg";
231
+ dialect: 'pg';
232
232
  }>;
233
233
  /** Current provider projection for pull requests classified as Junior-owned. */
234
234
  export declare const juniorGitHubPullRequests: import("drizzle-orm/pg-core").PgTableWithColumns<{
@@ -308,7 +308,7 @@ export declare const juniorGitHubPullRequests: import("drizzle-orm/pg-core").PgT
308
308
  tableName: "junior_github_pull_requests";
309
309
  dataType: "string";
310
310
  columnType: "PgText";
311
- data: "merged" | "open" | "closed_unmerged";
311
+ data: "closed_unmerged" | "merged" | "open";
312
312
  driverParam: string;
313
313
  notNull: true;
314
314
  hasDefault: false;
@@ -320,7 +320,7 @@ export declare const juniorGitHubPullRequests: import("drizzle-orm/pg-core").PgT
320
320
  identity: undefined;
321
321
  generated: undefined;
322
322
  }, {}, {
323
- $type: "merged" | "open" | "closed_unmerged";
323
+ $type: "closed_unmerged" | "merged" | "open";
324
324
  }>;
325
325
  commitComposition: import("drizzle-orm/pg-core").PgColumn<{
326
326
  name: "commit_composition";
@@ -376,8 +376,8 @@ export declare const juniorGitHubPullRequests: import("drizzle-orm/pg-core").PgT
376
376
  }, {}, {
377
377
  baseBuilder: import("drizzle-orm/pg-core").PgColumnBuilder<{
378
378
  name: "conversation_ids";
379
- dataType: "string";
380
- columnType: "PgText";
379
+ dataType: 'string';
380
+ columnType: 'PgText';
381
381
  data: string;
382
382
  enumValues: [string, ...string[]];
383
383
  driverParam: string;
@@ -453,7 +453,7 @@ export declare const juniorGitHubPullRequests: import("drizzle-orm/pg-core").PgT
453
453
  generated: undefined;
454
454
  }, {}, {}>;
455
455
  };
456
- dialect: "pg";
456
+ dialect: 'pg';
457
457
  }>;
458
458
  /** Many-to-many links between tracked pull requests and tracked issues. */
459
459
  export declare const juniorGitHubPullRequestIssues: import("drizzle-orm/pg-core").PgTableWithColumns<{
@@ -512,7 +512,7 @@ export declare const juniorGitHubPullRequestIssues: import("drizzle-orm/pg-core"
512
512
  generated: undefined;
513
513
  }, {}, {}>;
514
514
  };
515
- dialect: "pg";
515
+ dialect: 'pg';
516
516
  }>;
517
517
  export declare const githubSqlSchema: {
518
518
  juniorGitHubIssues: import("drizzle-orm/pg-core").PgTableWithColumns<{
@@ -660,8 +660,8 @@ export declare const githubSqlSchema: {
660
660
  }, {}, {
661
661
  baseBuilder: import("drizzle-orm/pg-core").PgColumnBuilder<{
662
662
  name: "conversation_ids";
663
- dataType: "string";
664
- columnType: "PgText";
663
+ dataType: 'string';
664
+ columnType: 'PgText';
665
665
  data: string;
666
666
  enumValues: [string, ...string[]];
667
667
  driverParam: string;
@@ -720,7 +720,7 @@ export declare const githubSqlSchema: {
720
720
  generated: undefined;
721
721
  }, {}, {}>;
722
722
  };
723
- dialect: "pg";
723
+ dialect: 'pg';
724
724
  }>;
725
725
  juniorGitHubPullRequestIssues: import("drizzle-orm/pg-core").PgTableWithColumns<{
726
726
  name: "junior_github_pull_request_issues";
@@ -778,7 +778,7 @@ export declare const githubSqlSchema: {
778
778
  generated: undefined;
779
779
  }, {}, {}>;
780
780
  };
781
- dialect: "pg";
781
+ dialect: 'pg';
782
782
  }>;
783
783
  juniorGitHubPullRequests: import("drizzle-orm/pg-core").PgTableWithColumns<{
784
784
  name: "junior_github_pull_requests";
@@ -857,7 +857,7 @@ export declare const githubSqlSchema: {
857
857
  tableName: "junior_github_pull_requests";
858
858
  dataType: "string";
859
859
  columnType: "PgText";
860
- data: "merged" | "open" | "closed_unmerged";
860
+ data: "closed_unmerged" | "merged" | "open";
861
861
  driverParam: string;
862
862
  notNull: true;
863
863
  hasDefault: false;
@@ -869,7 +869,7 @@ export declare const githubSqlSchema: {
869
869
  identity: undefined;
870
870
  generated: undefined;
871
871
  }, {}, {
872
- $type: "merged" | "open" | "closed_unmerged";
872
+ $type: "closed_unmerged" | "merged" | "open";
873
873
  }>;
874
874
  commitComposition: import("drizzle-orm/pg-core").PgColumn<{
875
875
  name: "commit_composition";
@@ -925,8 +925,8 @@ export declare const githubSqlSchema: {
925
925
  }, {}, {
926
926
  baseBuilder: import("drizzle-orm/pg-core").PgColumnBuilder<{
927
927
  name: "conversation_ids";
928
- dataType: "string";
929
- columnType: "PgText";
928
+ dataType: 'string';
929
+ columnType: 'PgText';
930
930
  data: string;
931
931
  enumValues: [string, ...string[]];
932
932
  driverParam: string;
@@ -1002,6 +1002,6 @@ export declare const githubSqlSchema: {
1002
1002
  generated: undefined;
1003
1003
  }, {}, {}>;
1004
1004
  };
1005
- dialect: "pg";
1005
+ dialect: 'pg';
1006
1006
  }>;
1007
1007
  };
@@ -24,7 +24,7 @@ export declare function gitHubPullRequestCreateWatch(config: GitHubPullRequestSu
24
24
  export declare const GITHUB_PULL_REQUEST_SUGGESTED_EVENTS: readonly ["pull_request.checks.failed", "pull_request.comment.created", "pull_request.ready_for_review", "pull_request.review.changes_requested", "pull_request.review.commented", "pull_request.review_comment.created", "pull_request.merged", "pull_request.closed_unmerged"];
25
25
  /** Exact values GitHub may set on pull request event data. Missing keys do not match. */
26
26
  export declare const GITHUB_PULL_REQUEST_MATCH_FIELDS: Record<string, {
27
- kind: "string" | "number" | "boolean";
27
+ kind: "boolean" | "number" | "string";
28
28
  description: string;
29
29
  enum?: string[] | undefined;
30
30
  }>;
package/dist/index.js CHANGED
@@ -53,7 +53,7 @@ import {
53
53
  readGrantPermissions,
54
54
  requireEnv,
55
55
  resolveUserAccount
56
- } from "./chunk-JF4WIM23.js";
56
+ } from "./chunk-XN3WOI7O.js";
57
57
 
58
58
  // src/plugin.ts
59
59
  import {
@@ -539,13 +539,22 @@ function cleanDisplayValue(value, userId) {
539
539
  }
540
540
  return cleaned;
541
541
  }
542
+ function automationLabel(source, automationUrl) {
543
+ if (source?.kind !== "event_automation" && source?.kind !== "scheduled_automation" || !source.automationId) {
544
+ return void 0;
545
+ }
546
+ const automation = `automation \`${source.automationId}\``;
547
+ const label = automationUrl ? `[${automation}](${automationUrl})` : automation;
548
+ return source.automationRunId ? `${label} \xB7 Run ID \`${source.automationRunId}\`` : label;
549
+ }
542
550
  function requesterLabel(args) {
543
551
  const { actor, identity, user } = args;
544
- if (!actor) {
545
- return void 0;
552
+ const automation = automationLabel(args.source, args.automationUrl);
553
+ if (automation) {
554
+ return automation;
546
555
  }
547
- if (actor.platform === "system") {
548
- return `Junior system actor \`${actor.name}\``;
556
+ if (!actor || actor.platform === "system") {
557
+ return void 0;
549
558
  }
550
559
  const login = linkedGitHubLogin(user);
551
560
  if (login) {
@@ -561,7 +570,7 @@ function parseExistingLabels(blockContents) {
561
570
  return [];
562
571
  }
563
572
  const withoutLeadIn = trimmed.replace(/^(?:Requested by|via)\s+/i, "");
564
- return withoutLeadIn.split(/,\s*(?=\*\*|@|Junior system actor `|via\s)/i).map((entry) => entry.trim().replace(/^via\s+/i, "")).filter(Boolean);
573
+ return withoutLeadIn.split(/,\s*(?=\*\*|@|\[?automation `|Junior system actor `|via\s)/i).map((entry) => entry.trim().replace(/^via\s+/i, "")).filter(Boolean);
565
574
  }
566
575
  function formatAttributionBlock(labels) {
567
576
  return `${GITHUB_REQUEST_ATTRIBUTION_START}
@@ -574,7 +583,7 @@ function applyAttribution(body, label) {
574
583
  `${GITHUB_REQUEST_ATTRIBUTION_START}([\\s\\S]*?)${GITHUB_REQUEST_ATTRIBUTION_END}`
575
584
  );
576
585
  const existingMatch = normalizedBody.match(existing);
577
- const existingLabels = existingMatch ? parseExistingLabels(existingMatch[1]) : [];
586
+ const existingLabels = existingMatch?.[1] !== void 0 ? parseExistingLabels(existingMatch[1]) : [];
578
587
  const labels = label && !existingLabels.includes(label) ? [...existingLabels, label] : existingLabels;
579
588
  const attribution = labels.length ? formatAttributionBlock(labels) : void 0;
580
589
  if (existingMatch) {
@@ -602,7 +611,9 @@ async function appendGitHubRequesterAttribution(body, ctx) {
602
611
  body,
603
612
  requesterLabel({
604
613
  actor: ctx.actor,
614
+ automationUrl: ctx.automationLink?.url,
605
615
  identity: resolved?.identity,
616
+ source: ctx.source,
606
617
  user: resolved?.user
607
618
  })
608
619
  );
@@ -15,9 +15,9 @@ declare const githubPullRequestOutcomeInputSchema: z.ZodObject<{
15
15
  repositoryFullName: z.ZodString;
16
16
  repositoryId: z.ZodString;
17
17
  state: z.ZodEnum<{
18
+ closed_unmerged: "closed_unmerged";
18
19
  merged: "merged";
19
20
  open: "open";
20
- closed_unmerged: "closed_unmerged";
21
21
  }>;
22
22
  title: z.ZodOptional<z.ZodString>;
23
23
  updatedAt: z.ZodDate;
package/dist/testing.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  normalizeGitHubEvents
3
- } from "./chunk-JF4WIM23.js";
3
+ } from "./chunk-XN3WOI7O.js";
4
4
  export {
5
5
  normalizeGitHubEvents
6
6
  };
@@ -1,4 +1,4 @@
1
- import type { Actor, Identity, PluginLogger, User } from "@sentry/junior-plugin-api";
1
+ import type { Actor, Identity, PluginLogger, Source, User } from "@sentry/junior-plugin-api";
2
2
  export declare const GITHUB_REQUEST_ATTRIBUTION_START = "<!-- junior-request-attribution:start -->";
3
3
  export declare const GITHUB_REQUEST_ATTRIBUTION_END = "<!-- junior-request-attribution:end -->";
4
4
  /**
@@ -16,7 +16,11 @@ export declare function linkedGitHubLogin(user: User | undefined): string | unde
16
16
  */
17
17
  export declare function appendGitHubRequesterAttribution(body: string, ctx: {
18
18
  actor?: Actor;
19
+ automationLink?: {
20
+ url: string;
21
+ };
19
22
  log: PluginLogger;
23
+ source?: Source;
20
24
  users: {
21
25
  resolveActor(): Promise<{
22
26
  identity?: Identity;
@@ -9,14 +9,11 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
9
9
  directory?: string | undefined;
10
10
  allowAdHoc?: boolean | undefined;
11
11
  }, {
12
- path: string;
13
- repo: string;
14
- target: "cloneRepository";
15
12
  objectAnnotations?: {
16
13
  kind: "object";
17
14
  key: string;
18
15
  label: string;
19
- objectType: "code_change" | "task" | "deployment" | "calendar_event" | "automation" | "item";
16
+ objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
20
17
  title: string;
21
18
  url: string | null;
22
19
  description?: string | undefined;
@@ -31,7 +28,7 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
31
28
  sourceBranch?: string | undefined;
32
29
  targetBranch?: string | undefined;
33
30
  reviewers?: string[] | undefined;
34
- review?: "required" | "approved" | "changes_requested" | undefined;
31
+ review?: "approved" | "changes_requested" | "required" | undefined;
35
32
  checks?: {
36
33
  passed: number;
37
34
  failed: number;
@@ -66,15 +63,15 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
66
63
  arguments: Record<string, unknown>;
67
64
  reason?: string | undefined;
68
65
  } | undefined;
69
- }, {
70
66
  path: string;
71
67
  repo: string;
72
68
  target: "cloneRepository";
69
+ }, {
73
70
  objectAnnotations?: {
74
71
  kind: "object";
75
72
  key: string;
76
73
  label: string;
77
- objectType: "code_change" | "task" | "deployment" | "calendar_event" | "automation" | "item";
74
+ objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
78
75
  title: string;
79
76
  url: string | null;
80
77
  description?: string | undefined;
@@ -89,7 +86,7 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
89
86
  sourceBranch?: string | undefined;
90
87
  targetBranch?: string | undefined;
91
88
  reviewers?: string[] | undefined;
92
- review?: "required" | "approved" | "changes_requested" | undefined;
89
+ review?: "approved" | "changes_requested" | "required" | undefined;
93
90
  checks?: {
94
91
  passed: number;
95
92
  failed: number;
@@ -124,4 +121,7 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
124
121
  arguments: Record<string, unknown>;
125
122
  reason?: string | undefined;
126
123
  } | undefined;
124
+ path: string;
125
+ repo: string;
126
+ target: "cloneRepository";
127
127
  }>;
@@ -6,14 +6,11 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
6
6
  body?: string | undefined;
7
7
  labels?: string[] | undefined;
8
8
  }, {
9
- number: number;
10
- url: string;
11
- target: "createIssue";
12
9
  objectAnnotations?: {
13
10
  kind: "object";
14
11
  key: string;
15
12
  label: string;
16
- objectType: "code_change" | "task" | "deployment" | "calendar_event" | "automation" | "item";
13
+ objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
17
14
  title: string;
18
15
  url: string | null;
19
16
  description?: string | undefined;
@@ -28,7 +25,7 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
28
25
  sourceBranch?: string | undefined;
29
26
  targetBranch?: string | undefined;
30
27
  reviewers?: string[] | undefined;
31
- review?: "required" | "approved" | "changes_requested" | undefined;
28
+ review?: "approved" | "changes_requested" | "required" | undefined;
32
29
  checks?: {
33
30
  passed: number;
34
31
  failed: number;
@@ -63,23 +60,23 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
63
60
  arguments: Record<string, unknown>;
64
61
  reason?: string | undefined;
65
62
  } | undefined;
63
+ number: number;
66
64
  subscribable?: {
67
65
  identifier: string;
68
66
  label: string;
69
67
  namespace: string;
68
+ suggestedEvents?: string[] | undefined;
70
69
  supportedEvents: string[];
71
70
  type: string;
72
- suggestedEvents?: string[] | undefined;
73
71
  } | undefined;
74
- }, {
75
- number: number;
76
72
  url: string;
77
73
  target: "createIssue";
74
+ }, {
78
75
  objectAnnotations?: {
79
76
  kind: "object";
80
77
  key: string;
81
78
  label: string;
82
- objectType: "code_change" | "task" | "deployment" | "calendar_event" | "automation" | "item";
79
+ objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
83
80
  title: string;
84
81
  url: string | null;
85
82
  description?: string | undefined;
@@ -94,7 +91,7 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
94
91
  sourceBranch?: string | undefined;
95
92
  targetBranch?: string | undefined;
96
93
  reviewers?: string[] | undefined;
97
- review?: "required" | "approved" | "changes_requested" | undefined;
94
+ review?: "approved" | "changes_requested" | "required" | undefined;
98
95
  checks?: {
99
96
  passed: number;
100
97
  failed: number;
@@ -129,12 +126,15 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
129
126
  arguments: Record<string, unknown>;
130
127
  reason?: string | undefined;
131
128
  } | undefined;
129
+ number: number;
132
130
  subscribable?: {
133
131
  identifier: string;
134
132
  label: string;
135
133
  namespace: string;
134
+ suggestedEvents?: string[] | undefined;
136
135
  supportedEvents: string[];
137
136
  type: string;
138
- suggestedEvents?: string[] | undefined;
139
137
  } | undefined;
138
+ url: string;
139
+ target: "createIssue";
140
140
  }>;
@@ -9,14 +9,11 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
9
9
  body?: string | undefined;
10
10
  draft?: boolean | undefined;
11
11
  }, {
12
- number: number;
13
- url: string;
14
- target: "createPullRequest";
15
12
  objectAnnotations?: {
16
13
  kind: "object";
17
14
  key: string;
18
15
  label: string;
19
- objectType: "code_change" | "task" | "deployment" | "calendar_event" | "automation" | "item";
16
+ objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
20
17
  title: string;
21
18
  url: string | null;
22
19
  description?: string | undefined;
@@ -31,7 +28,7 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
31
28
  sourceBranch?: string | undefined;
32
29
  targetBranch?: string | undefined;
33
30
  reviewers?: string[] | undefined;
34
- review?: "required" | "approved" | "changes_requested" | undefined;
31
+ review?: "approved" | "changes_requested" | "required" | undefined;
35
32
  checks?: {
36
33
  passed: number;
37
34
  failed: number;
@@ -66,27 +63,27 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
66
63
  arguments: Record<string, unknown>;
67
64
  reason?: string | undefined;
68
65
  } | undefined;
66
+ number: number;
67
+ url: string;
69
68
  subscribable?: {
70
69
  identifier: string;
71
70
  label: string;
72
71
  namespace: string;
72
+ suggestedEvents?: string[] | undefined;
73
73
  supportedEvents: string[];
74
74
  type: string;
75
- suggestedEvents?: string[] | undefined;
76
75
  } | undefined;
77
76
  subscription?: {
78
77
  events: string[];
79
78
  id: string;
80
79
  } | undefined;
81
- }, {
82
- number: number;
83
- url: string;
84
80
  target: "createPullRequest";
81
+ }, {
85
82
  objectAnnotations?: {
86
83
  kind: "object";
87
84
  key: string;
88
85
  label: string;
89
- objectType: "code_change" | "task" | "deployment" | "calendar_event" | "automation" | "item";
86
+ objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
90
87
  title: string;
91
88
  url: string | null;
92
89
  description?: string | undefined;
@@ -101,7 +98,7 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
101
98
  sourceBranch?: string | undefined;
102
99
  targetBranch?: string | undefined;
103
100
  reviewers?: string[] | undefined;
104
- review?: "required" | "approved" | "changes_requested" | undefined;
101
+ review?: "approved" | "changes_requested" | "required" | undefined;
105
102
  checks?: {
106
103
  passed: number;
107
104
  failed: number;
@@ -136,16 +133,19 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
136
133
  arguments: Record<string, unknown>;
137
134
  reason?: string | undefined;
138
135
  } | undefined;
136
+ number: number;
137
+ url: string;
139
138
  subscribable?: {
140
139
  identifier: string;
141
140
  label: string;
142
141
  namespace: string;
142
+ suggestedEvents?: string[] | undefined;
143
143
  supportedEvents: string[];
144
144
  type: string;
145
- suggestedEvents?: string[] | undefined;
146
145
  } | undefined;
147
146
  subscription?: {
148
147
  events: string[];
149
148
  id: string;
150
149
  } | undefined;
150
+ target: "createPullRequest";
151
151
  }>;
@@ -10,35 +10,11 @@ export declare function createGitHubGetDeploymentTool(ctx: {
10
10
  commitSha: string;
11
11
  environment?: string | undefined;
12
12
  }, {
13
- commitSha: string;
14
- deployment: {
15
- createdAt: string;
16
- creator: string | null;
17
- description: string | null;
18
- environment: string;
19
- id: number;
20
- latestStatus: {
21
- createdAt: string;
22
- creator: string | null;
23
- description: string | null;
24
- environmentUrl: string | null;
25
- id: number;
26
- logUrl: string | null;
27
- state: string;
28
- } | null;
29
- ref: string;
30
- sha: string;
31
- updatedAt: string;
32
- url: string;
33
- } | null;
34
- environment: string | null;
35
- repo: string;
36
- target: "getDeployment";
37
13
  objectAnnotations?: {
38
14
  kind: "object";
39
15
  key: string;
40
16
  label: string;
41
- objectType: "code_change" | "task" | "deployment" | "calendar_event" | "automation" | "item";
17
+ objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
42
18
  title: string;
43
19
  url: string | null;
44
20
  description?: string | undefined;
@@ -53,7 +29,7 @@ export declare function createGitHubGetDeploymentTool(ctx: {
53
29
  sourceBranch?: string | undefined;
54
30
  targetBranch?: string | undefined;
55
31
  reviewers?: string[] | undefined;
56
- review?: "required" | "approved" | "changes_requested" | undefined;
32
+ review?: "approved" | "changes_requested" | "required" | undefined;
57
33
  checks?: {
58
34
  passed: number;
59
35
  failed: number;
@@ -88,15 +64,6 @@ export declare function createGitHubGetDeploymentTool(ctx: {
88
64
  arguments: Record<string, unknown>;
89
65
  reason?: string | undefined;
90
66
  } | undefined;
91
- subscribable?: {
92
- identifier: string;
93
- label: string;
94
- namespace: string;
95
- supportedEvents: string[];
96
- type: string;
97
- suggestedEvents?: string[] | undefined;
98
- } | undefined;
99
- }, {
100
67
  commitSha: string;
101
68
  deployment: {
102
69
  createdAt: string;
@@ -120,12 +87,21 @@ export declare function createGitHubGetDeploymentTool(ctx: {
120
87
  } | null;
121
88
  environment: string | null;
122
89
  repo: string;
90
+ subscribable?: {
91
+ identifier: string;
92
+ label: string;
93
+ namespace: string;
94
+ suggestedEvents?: string[] | undefined;
95
+ supportedEvents: string[];
96
+ type: string;
97
+ } | undefined;
123
98
  target: "getDeployment";
99
+ }, {
124
100
  objectAnnotations?: {
125
101
  kind: "object";
126
102
  key: string;
127
103
  label: string;
128
- objectType: "code_change" | "task" | "deployment" | "calendar_event" | "automation" | "item";
104
+ objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
129
105
  title: string;
130
106
  url: string | null;
131
107
  description?: string | undefined;
@@ -140,7 +116,7 @@ export declare function createGitHubGetDeploymentTool(ctx: {
140
116
  sourceBranch?: string | undefined;
141
117
  targetBranch?: string | undefined;
142
118
  reviewers?: string[] | undefined;
143
- review?: "required" | "approved" | "changes_requested" | undefined;
119
+ review?: "approved" | "changes_requested" | "required" | undefined;
144
120
  checks?: {
145
121
  passed: number;
146
122
  failed: number;
@@ -175,12 +151,36 @@ export declare function createGitHubGetDeploymentTool(ctx: {
175
151
  arguments: Record<string, unknown>;
176
152
  reason?: string | undefined;
177
153
  } | undefined;
154
+ commitSha: string;
155
+ deployment: {
156
+ createdAt: string;
157
+ creator: string | null;
158
+ description: string | null;
159
+ environment: string;
160
+ id: number;
161
+ latestStatus: {
162
+ createdAt: string;
163
+ creator: string | null;
164
+ description: string | null;
165
+ environmentUrl: string | null;
166
+ id: number;
167
+ logUrl: string | null;
168
+ state: string;
169
+ } | null;
170
+ ref: string;
171
+ sha: string;
172
+ updatedAt: string;
173
+ url: string;
174
+ } | null;
175
+ environment: string | null;
176
+ repo: string;
178
177
  subscribable?: {
179
178
  identifier: string;
180
179
  label: string;
181
180
  namespace: string;
181
+ suggestedEvents?: string[] | undefined;
182
182
  supportedEvents: string[];
183
183
  type: string;
184
- suggestedEvents?: string[] | undefined;
185
184
  } | undefined;
185
+ target: "getDeployment";
186
186
  }>;