@sentry/junior-github 0.257.0 → 0.259.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.
@@ -15,17 +15,11 @@ export declare function createGitHubSubmitPullRequestReviewTool(egress: PluginEg
15
15
  }[] | undefined;
16
16
  }, {
17
17
  [x: string]: unknown;
18
- target: "submitPullRequestReview";
19
- repo: string;
20
- number: number;
21
- reviewId: number;
22
- state: string;
23
- url: string;
24
18
  objectAnnotations?: {
25
19
  kind: "object";
26
20
  key: string;
27
21
  label: string;
28
- objectType: "code_change" | "task" | "deployment" | "calendar_event" | "automation" | "item";
22
+ objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
29
23
  title: string;
30
24
  url: string | null;
31
25
  description?: string | undefined;
@@ -40,7 +34,7 @@ export declare function createGitHubSubmitPullRequestReviewTool(egress: PluginEg
40
34
  sourceBranch?: string | undefined;
41
35
  targetBranch?: string | undefined;
42
36
  reviewers?: string[] | undefined;
43
- review?: "required" | "approved" | "changes_requested" | undefined;
37
+ review?: "approved" | "changes_requested" | "required" | undefined;
44
38
  checks?: {
45
39
  passed: number;
46
40
  failed: number;
@@ -75,19 +69,19 @@ export declare function createGitHubSubmitPullRequestReviewTool(egress: PluginEg
75
69
  arguments: Record<string, unknown>;
76
70
  reason?: string | undefined;
77
71
  } | undefined;
78
- }, {
79
- [x: string]: unknown;
80
72
  target: "submitPullRequestReview";
81
73
  repo: string;
82
74
  number: number;
83
75
  reviewId: number;
84
76
  state: string;
85
77
  url: string;
78
+ }, {
79
+ [x: string]: unknown;
86
80
  objectAnnotations?: {
87
81
  kind: "object";
88
82
  key: string;
89
83
  label: string;
90
- objectType: "code_change" | "task" | "deployment" | "calendar_event" | "automation" | "item";
84
+ objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
91
85
  title: string;
92
86
  url: string | null;
93
87
  description?: string | undefined;
@@ -102,7 +96,7 @@ export declare function createGitHubSubmitPullRequestReviewTool(egress: PluginEg
102
96
  sourceBranch?: string | undefined;
103
97
  targetBranch?: string | undefined;
104
98
  reviewers?: string[] | undefined;
105
- review?: "required" | "approved" | "changes_requested" | undefined;
99
+ review?: "approved" | "changes_requested" | "required" | undefined;
106
100
  checks?: {
107
101
  passed: number;
108
102
  failed: number;
@@ -137,4 +131,10 @@ export declare function createGitHubSubmitPullRequestReviewTool(egress: PluginEg
137
131
  arguments: Record<string, unknown>;
138
132
  reason?: string | undefined;
139
133
  } | undefined;
134
+ target: "submitPullRequestReview";
135
+ repo: string;
136
+ number: number;
137
+ reviewId: number;
138
+ state: string;
139
+ url: string;
140
140
  }>;
@@ -1,7 +1,10 @@
1
- import { type Identity, type User, type Actor, type PluginLogger, type PluginEgress } from "@sentry/junior-plugin-api";
1
+ import { type Identity, type User, type Actor, type PluginLogger, type PluginEgress, type Source } from "@sentry/junior-plugin-api";
2
2
  /** Update mutable issue metadata while preserving runtime-owned body attribution. */
3
3
  export declare function createGitHubUpdateIssueTool(ctx: {
4
4
  actor?: Actor;
5
+ automationLink?: {
6
+ url: string;
7
+ };
5
8
  conversationId?: string;
6
9
  egress: PluginEgress;
7
10
  log: PluginLogger;
@@ -13,6 +16,7 @@ export declare function createGitHubUpdateIssueTool(ctx: {
13
16
  url?: string;
14
17
  };
15
18
  };
19
+ source?: Source;
16
20
  users: {
17
21
  resolveActor(): Promise<{
18
22
  identity?: Identity;
@@ -26,17 +30,11 @@ export declare function createGitHubUpdateIssueTool(ctx: {
26
30
  body?: string | undefined;
27
31
  state?: "closed" | "open" | undefined;
28
32
  }, {
29
- body: string | null;
30
- number: number;
31
- state: string;
32
- title: string;
33
- url: string;
34
- target: "updateIssue";
35
33
  objectAnnotations?: {
36
34
  kind: "object";
37
35
  key: string;
38
36
  label: string;
39
- objectType: "code_change" | "task" | "deployment" | "calendar_event" | "automation" | "item";
37
+ objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
40
38
  title: string;
41
39
  url: string | null;
42
40
  description?: string | undefined;
@@ -51,7 +49,7 @@ export declare function createGitHubUpdateIssueTool(ctx: {
51
49
  sourceBranch?: string | undefined;
52
50
  targetBranch?: string | undefined;
53
51
  reviewers?: string[] | undefined;
54
- review?: "required" | "approved" | "changes_requested" | undefined;
52
+ review?: "approved" | "changes_requested" | "required" | undefined;
55
53
  checks?: {
56
54
  passed: number;
57
55
  failed: number;
@@ -86,26 +84,26 @@ export declare function createGitHubUpdateIssueTool(ctx: {
86
84
  arguments: Record<string, unknown>;
87
85
  reason?: string | undefined;
88
86
  } | undefined;
87
+ body: string | null;
88
+ number: number;
89
+ state: string;
89
90
  subscribable?: {
90
91
  identifier: string;
91
92
  label: string;
92
93
  namespace: string;
94
+ suggestedEvents?: string[] | undefined;
93
95
  supportedEvents: string[];
94
96
  type: string;
95
- suggestedEvents?: string[] | undefined;
96
97
  } | undefined;
97
- }, {
98
- body: string | null;
99
- number: number;
100
- state: string;
101
98
  title: string;
102
99
  url: string;
103
100
  target: "updateIssue";
101
+ }, {
104
102
  objectAnnotations?: {
105
103
  kind: "object";
106
104
  key: string;
107
105
  label: string;
108
- objectType: "code_change" | "task" | "deployment" | "calendar_event" | "automation" | "item";
106
+ objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
109
107
  title: string;
110
108
  url: string | null;
111
109
  description?: string | undefined;
@@ -120,7 +118,7 @@ export declare function createGitHubUpdateIssueTool(ctx: {
120
118
  sourceBranch?: string | undefined;
121
119
  targetBranch?: string | undefined;
122
120
  reviewers?: string[] | undefined;
123
- review?: "required" | "approved" | "changes_requested" | undefined;
121
+ review?: "approved" | "changes_requested" | "required" | undefined;
124
122
  checks?: {
125
123
  passed: number;
126
124
  failed: number;
@@ -155,12 +153,18 @@ export declare function createGitHubUpdateIssueTool(ctx: {
155
153
  arguments: Record<string, unknown>;
156
154
  reason?: string | undefined;
157
155
  } | undefined;
156
+ body: string | null;
157
+ number: number;
158
+ state: string;
158
159
  subscribable?: {
159
160
  identifier: string;
160
161
  label: string;
161
162
  namespace: string;
163
+ suggestedEvents?: string[] | undefined;
162
164
  supportedEvents: string[];
163
165
  type: string;
164
- suggestedEvents?: string[] | undefined;
165
166
  } | undefined;
167
+ title: string;
168
+ url: string;
169
+ target: "updateIssue";
166
170
  }>;
@@ -28,21 +28,16 @@ export declare function createGitHubUpdatePullRequestFeedbackTool(ctx: {
28
28
  egress: PluginEgress;
29
29
  }, botEmail: string | undefined): import("@sentry/junior-plugin-api").PluginToolDefinition<{
30
30
  repo: string;
31
- commentKind: "review" | "conversation";
31
+ commentKind: "conversation" | "review";
32
32
  commentId: number;
33
33
  status: "addressed" | "declined";
34
34
  }, {
35
35
  [x: string]: unknown;
36
- target: "updatePullRequestFeedback";
37
- repo: string;
38
- commentId: number;
39
- status: "addressed" | "declined";
40
- reactionId: number;
41
36
  objectAnnotations?: {
42
37
  kind: "object";
43
38
  key: string;
44
39
  label: string;
45
- objectType: "code_change" | "task" | "deployment" | "calendar_event" | "automation" | "item";
40
+ objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
46
41
  title: string;
47
42
  url: string | null;
48
43
  description?: string | undefined;
@@ -57,7 +52,7 @@ export declare function createGitHubUpdatePullRequestFeedbackTool(ctx: {
57
52
  sourceBranch?: string | undefined;
58
53
  targetBranch?: string | undefined;
59
54
  reviewers?: string[] | undefined;
60
- review?: "required" | "approved" | "changes_requested" | undefined;
55
+ review?: "approved" | "changes_requested" | "required" | undefined;
61
56
  checks?: {
62
57
  passed: number;
63
58
  failed: number;
@@ -92,18 +87,18 @@ export declare function createGitHubUpdatePullRequestFeedbackTool(ctx: {
92
87
  arguments: Record<string, unknown>;
93
88
  reason?: string | undefined;
94
89
  } | undefined;
95
- }, {
96
- [x: string]: unknown;
97
90
  target: "updatePullRequestFeedback";
98
91
  repo: string;
99
92
  commentId: number;
100
93
  status: "addressed" | "declined";
101
94
  reactionId: number;
95
+ }, {
96
+ [x: string]: unknown;
102
97
  objectAnnotations?: {
103
98
  kind: "object";
104
99
  key: string;
105
100
  label: string;
106
- objectType: "code_change" | "task" | "deployment" | "calendar_event" | "automation" | "item";
101
+ objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
107
102
  title: string;
108
103
  url: string | null;
109
104
  description?: string | undefined;
@@ -118,7 +113,7 @@ export declare function createGitHubUpdatePullRequestFeedbackTool(ctx: {
118
113
  sourceBranch?: string | undefined;
119
114
  targetBranch?: string | undefined;
120
115
  reviewers?: string[] | undefined;
121
- review?: "required" | "approved" | "changes_requested" | undefined;
116
+ review?: "approved" | "changes_requested" | "required" | undefined;
122
117
  checks?: {
123
118
  passed: number;
124
119
  failed: number;
@@ -153,5 +148,10 @@ export declare function createGitHubUpdatePullRequestFeedbackTool(ctx: {
153
148
  arguments: Record<string, unknown>;
154
149
  reason?: string | undefined;
155
150
  } | undefined;
151
+ target: "updatePullRequestFeedback";
152
+ repo: string;
153
+ commentId: number;
154
+ status: "addressed" | "declined";
155
+ reactionId: number;
156
156
  }>;
157
157
  export {};
@@ -1,7 +1,10 @@
1
- import { type Identity, type User, type Actor, type PluginLogger, type PluginEgress } from "@sentry/junior-plugin-api";
1
+ import { type Identity, type User, type Actor, type PluginLogger, type PluginEgress, type Source } from "@sentry/junior-plugin-api";
2
2
  /** Update mutable PR metadata while preserving runtime-owned body attribution. */
3
3
  export declare function createGitHubUpdatePullRequestTool(ctx: {
4
4
  actor?: Actor;
5
+ automationLink?: {
6
+ url: string;
7
+ };
5
8
  conversationId?: string;
6
9
  egress: PluginEgress;
7
10
  log: PluginLogger;
@@ -13,6 +16,7 @@ export declare function createGitHubUpdatePullRequestTool(ctx: {
13
16
  url?: string;
14
17
  };
15
18
  };
19
+ source?: Source;
16
20
  users: {
17
21
  resolveActor(): Promise<{
18
22
  identity?: Identity;
@@ -28,19 +32,11 @@ export declare function createGitHubUpdatePullRequestTool(ctx: {
28
32
  state?: "closed" | "open" | undefined;
29
33
  draft?: boolean | undefined;
30
34
  }, {
31
- base: string;
32
- body: string | null;
33
- draft: boolean;
34
- number: number;
35
- state: string;
36
- title: string;
37
- url: string;
38
- target: "updatePullRequest";
39
35
  objectAnnotations?: {
40
36
  kind: "object";
41
37
  key: string;
42
38
  label: string;
43
- objectType: "code_change" | "task" | "deployment" | "calendar_event" | "automation" | "item";
39
+ objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
44
40
  title: string;
45
41
  url: string | null;
46
42
  description?: string | undefined;
@@ -55,7 +51,7 @@ export declare function createGitHubUpdatePullRequestTool(ctx: {
55
51
  sourceBranch?: string | undefined;
56
52
  targetBranch?: string | undefined;
57
53
  reviewers?: string[] | undefined;
58
- review?: "required" | "approved" | "changes_requested" | undefined;
54
+ review?: "approved" | "changes_requested" | "required" | undefined;
59
55
  checks?: {
60
56
  passed: number;
61
57
  failed: number;
@@ -90,28 +86,28 @@ export declare function createGitHubUpdatePullRequestTool(ctx: {
90
86
  arguments: Record<string, unknown>;
91
87
  reason?: string | undefined;
92
88
  } | undefined;
89
+ base: string;
90
+ body: string | null;
91
+ draft: boolean;
92
+ number: number;
93
+ state: string;
93
94
  subscribable?: {
94
95
  identifier: string;
95
96
  label: string;
96
97
  namespace: string;
98
+ suggestedEvents?: string[] | undefined;
97
99
  supportedEvents: string[];
98
100
  type: string;
99
- suggestedEvents?: string[] | undefined;
100
101
  } | undefined;
101
- }, {
102
- base: string;
103
- body: string | null;
104
- draft: boolean;
105
- number: number;
106
- state: string;
107
102
  title: string;
108
103
  url: string;
109
104
  target: "updatePullRequest";
105
+ }, {
110
106
  objectAnnotations?: {
111
107
  kind: "object";
112
108
  key: string;
113
109
  label: string;
114
- objectType: "code_change" | "task" | "deployment" | "calendar_event" | "automation" | "item";
110
+ objectType: "automation" | "calendar_event" | "code_change" | "deployment" | "item" | "task";
115
111
  title: string;
116
112
  url: string | null;
117
113
  description?: string | undefined;
@@ -126,7 +122,7 @@ export declare function createGitHubUpdatePullRequestTool(ctx: {
126
122
  sourceBranch?: string | undefined;
127
123
  targetBranch?: string | undefined;
128
124
  reviewers?: string[] | undefined;
129
- review?: "required" | "approved" | "changes_requested" | undefined;
125
+ review?: "approved" | "changes_requested" | "required" | undefined;
130
126
  checks?: {
131
127
  passed: number;
132
128
  failed: number;
@@ -161,12 +157,20 @@ export declare function createGitHubUpdatePullRequestTool(ctx: {
161
157
  arguments: Record<string, unknown>;
162
158
  reason?: string | undefined;
163
159
  } | undefined;
160
+ base: string;
161
+ body: string | null;
162
+ draft: boolean;
163
+ number: number;
164
+ state: string;
164
165
  subscribable?: {
165
166
  identifier: string;
166
167
  label: string;
167
168
  namespace: string;
169
+ suggestedEvents?: string[] | undefined;
168
170
  supportedEvents: string[];
169
171
  type: string;
170
- suggestedEvents?: string[] | undefined;
171
172
  } | undefined;
173
+ title: string;
174
+ url: string;
175
+ target: "updatePullRequest";
172
176
  }>;
@@ -0,0 +1,17 @@
1
+ /** Environment variable names for the GitHub App installation. */
2
+ export interface GitHubInstallationEnv {
3
+ appIdEnv: string;
4
+ installationIdEnv: string;
5
+ privateKeyEnv: string;
6
+ }
7
+ /** Return a reader for pages of a pull request's commits, with a read-only token. */
8
+ export declare function loadPullRequestCommitPages(env: GitHubInstallationEnv, pullRequest: {
9
+ number: number;
10
+ repositoryFullName: string;
11
+ }): Promise<(page: number, perPage: number) => Promise<unknown>>;
12
+ /** Add the "reviewing" reaction to one pull request feedback comment. */
13
+ export declare function markPullRequestFeedbackReviewing(env: GitHubInstallationEnv, target: {
14
+ commentId: number;
15
+ commentKind: "conversation" | "review";
16
+ repo: string;
17
+ }): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-github",
3
- "version": "0.257.0",
3
+ "version": "0.259.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.257.0"
34
+ "@sentry/junior-plugin-api": "0.259.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@oxlint/plugins": "1.79.0",
@@ -40,7 +40,7 @@
40
40
  "msw": "^2.14.6",
41
41
  "oxlint": "^1.79.0",
42
42
  "tsup": "^8.5.1",
43
- "typescript": "^6.0.3",
43
+ "typescript": "^7.0.2",
44
44
  "vitest": "^4.1.7",
45
45
  "@sentry/junior-testing": "0.0.0"
46
46
  },