@sentry/junior-github 0.301.0 → 0.303.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.
Files changed (97) hide show
  1. package/dist/events-CrbJHQ0w.js +2466 -0
  2. package/dist/index.d.ts +71 -3
  3. package/dist/index.js +7294 -7881
  4. package/dist/testing.d.ts +51 -1
  5. package/dist/testing.js +1 -6
  6. package/migrations/0012_pull_request_next_action.sql +5 -0
  7. package/migrations/meta/0012_snapshot.json +434 -0
  8. package/migrations/meta/_journal.json +7 -0
  9. package/package.json +11 -13
  10. package/skills/github-code/SKILL.md +1 -1
  11. package/skills/github-code/SPEC.md +2 -2
  12. package/skills/github-code/references/workflow.md +1 -1
  13. package/dist/account-links.d.ts +0 -8
  14. package/dist/annotations.d.ts +0 -33
  15. package/dist/chunk-YUF5P5I7.js +0 -2507
  16. package/dist/clone-command.d.ts +0 -5
  17. package/dist/configured-repository.d.ts +0 -10
  18. package/dist/conversation-title-context.d.ts +0 -20
  19. package/dist/credential-support.d.ts +0 -107
  20. package/dist/db/database.d.ts +0 -5
  21. package/dist/db/schema.d.ts +0 -1403
  22. package/dist/default-branch.d.ts +0 -15
  23. package/dist/egress-policy.d.ts +0 -25
  24. package/dist/events/comment.d.ts +0 -14
  25. package/dist/events/declarations.d.ts +0 -18
  26. package/dist/events/deployment.d.ts +0 -38
  27. package/dist/events/issue.d.ts +0 -42
  28. package/dist/events/pull-request.d.ts +0 -75
  29. package/dist/events/release.d.ts +0 -42
  30. package/dist/events/repository.d.ts +0 -23
  31. package/dist/events/resource-url.d.ts +0 -5
  32. package/dist/events/scope.d.ts +0 -13
  33. package/dist/git-config.d.ts +0 -52
  34. package/dist/github-status.d.ts +0 -16
  35. package/dist/graphql-documents.d.ts +0 -31
  36. package/dist/images.d.ts +0 -8
  37. package/dist/issue-outcomes/store.d.ts +0 -42
  38. package/dist/merge-conflict-checks/heartbeat.d.ts +0 -27
  39. package/dist/merge-conflict-checks/store.d.ts +0 -44
  40. package/dist/merge-conflict-checks/webhooks.d.ts +0 -23
  41. package/dist/object-facts.d.ts +0 -29
  42. package/dist/permissions.d.ts +0 -6
  43. package/dist/plugin.d.ts +0 -45
  44. package/dist/pull-request-outcomes/apply.d.ts +0 -22
  45. package/dist/pull-request-outcomes/commit-composition.d.ts +0 -6
  46. package/dist/pull-request-outcomes/reconcile.d.ts +0 -41
  47. package/dist/pull-request-outcomes/store.d.ts +0 -115
  48. package/dist/pull-request-requesters/draft-reviewers.d.ts +0 -15
  49. package/dist/pull-request-requesters/store.d.ts +0 -41
  50. package/dist/pull-request-review-policy.d.ts +0 -6
  51. package/dist/receive-pack-policy.d.ts +0 -21
  52. package/dist/reply-markdown.d.ts +0 -18
  53. package/dist/sandbox-paths.d.ts +0 -4
  54. package/dist/tool-support/attribution.d.ts +0 -52
  55. package/dist/tool-support/github-api.d.ts +0 -51
  56. package/dist/tool-support/github-text.d.ts +0 -8
  57. package/dist/tool-support/pull-request-description.d.ts +0 -8
  58. package/dist/tools/clone-repository.d.ts +0 -205
  59. package/dist/tools/comment-on-issue.d.ts +0 -205
  60. package/dist/tools/comment-on-pull-request.d.ts +0 -210
  61. package/dist/tools/create-issue.d.ts +0 -218
  62. package/dist/tools/create-pull-request.d.ts +0 -240
  63. package/dist/tools/footer.d.ts +0 -17
  64. package/dist/tools/get-deployment.d.ts +0 -264
  65. package/dist/tools/get-issue.d.ts +0 -248
  66. package/dist/tools/get-pull-request.d.ts +0 -255
  67. package/dist/tools/get-release.d.ts +0 -243
  68. package/dist/tools/get-repository.d.ts +0 -226
  69. package/dist/tools/get-status.d.ts +0 -213
  70. package/dist/tools/react-to-issue.d.ts +0 -205
  71. package/dist/tools/resolve-pull-request-review-thread.d.ts +0 -206
  72. package/dist/tools/stack-pull-request.d.ts +0 -43
  73. package/dist/tools/submit-pull-request-review.d.ts +0 -216
  74. package/dist/tools/update-issue-comment.d.ts +0 -206
  75. package/dist/tools/update-issue.d.ts +0 -249
  76. package/dist/tools/update-pull-request-feedback.d.ts +0 -242
  77. package/dist/tools/update-pull-request.d.ts +0 -255
  78. package/dist/tools.d.ts +0 -13
  79. package/dist/webhooks/check-suite.d.ts +0 -94
  80. package/dist/webhooks/event-targets.d.ts +0 -44
  81. package/dist/webhooks/events.d.ts +0 -23
  82. package/dist/webhooks/fail-open-log.d.ts +0 -10
  83. package/dist/webhooks/handler.d.ts +0 -55
  84. package/dist/webhooks/installation-requests.d.ts +0 -98
  85. package/dist/webhooks/issue-outcome.d.ts +0 -11
  86. package/dist/webhooks/issue-update.d.ts +0 -8
  87. package/dist/webhooks/merge-conflict.d.ts +0 -48
  88. package/dist/webhooks/ownership.d.ts +0 -14
  89. package/dist/webhooks/pull-request-activity.d.ts +0 -11
  90. package/dist/webhooks/pull-request-match-data.d.ts +0 -31
  91. package/dist/webhooks/pull-request-outcome.d.ts +0 -16
  92. package/dist/webhooks/pull-request-people.d.ts +0 -51
  93. package/dist/webhooks/pull-request-preview.d.ts +0 -12
  94. package/dist/webhooks/pull-request-ready-reviewers.d.ts +0 -25
  95. package/dist/webhooks/pull-request-ready.d.ts +0 -31
  96. package/dist/webhooks/pull-request-review-request.d.ts +0 -32
  97. package/dist/workspace-prepare.d.ts +0 -3
@@ -1,249 +0,0 @@
1
- import { type Identity, type User, type Actor, type PluginLogger, type PluginEgress, type Source } from "@sentry/junior-plugin-api";
2
- /** Update mutable issue metadata while preserving runtime-owned body attribution. */
3
- export declare function createGitHubUpdateIssueTool(ctx: {
4
- actor?: Actor;
5
- automationLink?: {
6
- url: string;
7
- };
8
- conversationId?: string;
9
- egress: PluginEgress;
10
- log: PluginLogger;
11
- events: {
12
- canSubscribe: boolean;
13
- };
14
- conversationLink?: {
15
- url: string;
16
- };
17
- source?: Source;
18
- users: {
19
- resolveActor(): Promise<{
20
- identity?: Identity;
21
- user?: User;
22
- } | undefined>;
23
- };
24
- }): import("@sentry/junior-plugin-api").PluginToolDefinition<{
25
- repo: string;
26
- number: number;
27
- title?: string | undefined;
28
- body?: string | undefined;
29
- state?: "closed" | "open" | undefined;
30
- assign_requester?: boolean | undefined;
31
- }, {
32
- objectAnnotations?: {
33
- kind: "object";
34
- key: string;
35
- label: string;
36
- objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
37
- title: string;
38
- url: string | null;
39
- description?: string | undefined;
40
- status?: string | undefined;
41
- trigger?: string | undefined;
42
- warning?: string | undefined;
43
- displayType?: string | undefined;
44
- sourceUpdatedAt?: string | undefined;
45
- facts?: {
46
- type: "code_change";
47
- summary?: string | undefined;
48
- author?: string | undefined;
49
- sourceBranch?: string | undefined;
50
- targetBranch?: string | undefined;
51
- reviewers?: string[] | undefined;
52
- review?: "approved" | "changes_requested" | "required" | undefined;
53
- checks?: {
54
- passed: number;
55
- failed: number;
56
- pending: number;
57
- } | undefined;
58
- mergeable?: boolean | undefined;
59
- changedFiles?: number | undefined;
60
- additions?: number | undefined;
61
- deletions?: number | undefined;
62
- previewImageUrls?: string[] | undefined;
63
- } | {
64
- type: "task";
65
- summary?: string | undefined;
66
- assignees?: string[] | undefined;
67
- priority?: string | undefined;
68
- project?: string | undefined;
69
- cycle?: string | undefined;
70
- dueDate?: string | undefined;
71
- labels?: string[] | undefined;
72
- } | {
73
- type: "deployment";
74
- summary?: string | undefined;
75
- project?: string | undefined;
76
- environment?: string | undefined;
77
- revision?: string | undefined;
78
- branch?: string | undefined;
79
- } | {
80
- type: "calendar_event";
81
- summary?: string | undefined;
82
- when?: string | undefined;
83
- attendees?: string[] | undefined;
84
- } | {
85
- type: "conversation";
86
- summary?: string | undefined;
87
- participants?: string[] | undefined;
88
- lastActivityAt?: string | undefined;
89
- } | {
90
- type: "document";
91
- summary?: string | undefined;
92
- owner?: string | undefined;
93
- modifiedAt?: string | undefined;
94
- } | {
95
- type: "message";
96
- summary?: string | undefined;
97
- channel?: string | undefined;
98
- author?: string | undefined;
99
- sentAt?: string | undefined;
100
- } | {
101
- type: "web_page";
102
- summary?: string | undefined;
103
- siteName?: string | undefined;
104
- author?: string | undefined;
105
- thumbnailUrl?: string | undefined;
106
- } | {
107
- type: "person";
108
- summary?: string | undefined;
109
- email?: string | undefined;
110
- slackHandle?: string | undefined;
111
- githubHandle?: string | undefined;
112
- avatarUrl?: string | undefined;
113
- } | undefined;
114
- }[] | undefined;
115
- reply?: {
116
- text: string;
117
- url?: string | undefined;
118
- } | undefined;
119
- truncated?: boolean | undefined;
120
- continuation?: {
121
- arguments: Record<string, unknown>;
122
- reason?: string | undefined;
123
- } | undefined;
124
- assignees: string[];
125
- body: string | null;
126
- number: number;
127
- state: string;
128
- subscribable?: {
129
- identifier: string;
130
- label: string;
131
- match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
132
- namespace: string;
133
- suggested_events?: string[] | undefined;
134
- supported_events: string[];
135
- type: string;
136
- } | undefined;
137
- title: string;
138
- url: string;
139
- target: "updateIssue";
140
- }, {
141
- objectAnnotations?: {
142
- kind: "object";
143
- key: string;
144
- label: string;
145
- objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
146
- title: string;
147
- url: string | null;
148
- description?: string | undefined;
149
- status?: string | undefined;
150
- trigger?: string | undefined;
151
- warning?: string | undefined;
152
- displayType?: string | undefined;
153
- sourceUpdatedAt?: string | undefined;
154
- facts?: {
155
- type: "code_change";
156
- summary?: string | undefined;
157
- author?: string | undefined;
158
- sourceBranch?: string | undefined;
159
- targetBranch?: string | undefined;
160
- reviewers?: string[] | undefined;
161
- review?: "approved" | "changes_requested" | "required" | undefined;
162
- checks?: {
163
- passed: number;
164
- failed: number;
165
- pending: number;
166
- } | undefined;
167
- mergeable?: boolean | undefined;
168
- changedFiles?: number | undefined;
169
- additions?: number | undefined;
170
- deletions?: number | undefined;
171
- previewImageUrls?: string[] | undefined;
172
- } | {
173
- type: "task";
174
- summary?: string | undefined;
175
- assignees?: string[] | undefined;
176
- priority?: string | undefined;
177
- project?: string | undefined;
178
- cycle?: string | undefined;
179
- dueDate?: string | undefined;
180
- labels?: string[] | undefined;
181
- } | {
182
- type: "deployment";
183
- summary?: string | undefined;
184
- project?: string | undefined;
185
- environment?: string | undefined;
186
- revision?: string | undefined;
187
- branch?: string | undefined;
188
- } | {
189
- type: "calendar_event";
190
- summary?: string | undefined;
191
- when?: string | undefined;
192
- attendees?: string[] | undefined;
193
- } | {
194
- type: "conversation";
195
- summary?: string | undefined;
196
- participants?: string[] | undefined;
197
- lastActivityAt?: string | undefined;
198
- } | {
199
- type: "document";
200
- summary?: string | undefined;
201
- owner?: string | undefined;
202
- modifiedAt?: string | undefined;
203
- } | {
204
- type: "message";
205
- summary?: string | undefined;
206
- channel?: string | undefined;
207
- author?: string | undefined;
208
- sentAt?: string | undefined;
209
- } | {
210
- type: "web_page";
211
- summary?: string | undefined;
212
- siteName?: string | undefined;
213
- author?: string | undefined;
214
- thumbnailUrl?: string | undefined;
215
- } | {
216
- type: "person";
217
- summary?: string | undefined;
218
- email?: string | undefined;
219
- slackHandle?: string | undefined;
220
- githubHandle?: string | undefined;
221
- avatarUrl?: string | undefined;
222
- } | undefined;
223
- }[] | undefined;
224
- reply?: {
225
- text: string;
226
- url?: string | undefined;
227
- } | undefined;
228
- truncated?: boolean | undefined;
229
- continuation?: {
230
- arguments: Record<string, unknown>;
231
- reason?: string | undefined;
232
- } | undefined;
233
- assignees: string[];
234
- body: string | null;
235
- number: number;
236
- state: string;
237
- subscribable?: {
238
- identifier: string;
239
- label: string;
240
- match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
241
- namespace: string;
242
- suggested_events?: string[] | undefined;
243
- supported_events: string[];
244
- type: string;
245
- } | undefined;
246
- title: string;
247
- url: string;
248
- target: "updateIssue";
249
- }>;
@@ -1,242 +0,0 @@
1
- import { type PluginEgress } from "@sentry/junior-plugin-api";
2
- /**
3
- * GitHub has reactions but no feedback state. This tool maps each state to a
4
- * reaction and keeps at most one state reaction that Junior owns. It does not
5
- * change reactions from other users.
6
- */
7
- declare const STATUS_TO_REACTION_CONTENT: {
8
- readonly reviewing: "eyes";
9
- readonly addressed: "+1";
10
- readonly declined: "-1";
11
- };
12
- type FeedbackStatus = keyof typeof STATUS_TO_REACTION_CONTENT;
13
- type PullRequestCommentKind = "conversation" | "review";
14
- interface PullRequestCommentRef {
15
- owner: string;
16
- name: string;
17
- commentKind: PullRequestCommentKind;
18
- commentId: number;
19
- }
20
- /** Build the GitHub API path for one pull request comment's reactions. */
21
- export declare function pullRequestCommentReactionsPath(input: PullRequestCommentRef): string;
22
- /** Return the GitHub reaction for one feedback state. */
23
- export declare function pullRequestFeedbackReactionContent(status: FeedbackStatus): (typeof STATUS_TO_REACTION_CONTENT)[FeedbackStatus];
24
- /** Build the GitHub API path for one pull request review. */
25
- export declare function pullRequestReviewPath(input: {
26
- owner: string;
27
- name: string;
28
- pullRequest: number;
29
- reviewId: number;
30
- }): string;
31
- /** Return the GraphQL name of one REST reaction content. */
32
- export declare function graphqlReactionContent(content: string): string;
33
- /**
34
- * Set Junior's feedback reaction on a pull request comment or review body.
35
- * Replace only state reactions Junior previously added to the same comment.
36
- */
37
- export declare function createGitHubUpdatePullRequestFeedbackTool(ctx: {
38
- egress: PluginEgress;
39
- }, botEmail: string | undefined): import("@sentry/junior-plugin-api").PluginToolDefinition<{
40
- repo: string;
41
- comment_kind: "conversation" | "review" | "review_body";
42
- comment_id: number;
43
- pull_request: number;
44
- status: "addressed" | "declined";
45
- }, {
46
- [x: string]: unknown;
47
- objectAnnotations?: {
48
- kind: "object";
49
- key: string;
50
- label: string;
51
- objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
52
- title: string;
53
- url: string | null;
54
- description?: string | undefined;
55
- status?: string | undefined;
56
- trigger?: string | undefined;
57
- warning?: string | undefined;
58
- displayType?: string | undefined;
59
- sourceUpdatedAt?: string | undefined;
60
- facts?: {
61
- type: "code_change";
62
- summary?: string | undefined;
63
- author?: string | undefined;
64
- sourceBranch?: string | undefined;
65
- targetBranch?: string | undefined;
66
- reviewers?: string[] | undefined;
67
- review?: "approved" | "changes_requested" | "required" | undefined;
68
- checks?: {
69
- passed: number;
70
- failed: number;
71
- pending: number;
72
- } | undefined;
73
- mergeable?: boolean | undefined;
74
- changedFiles?: number | undefined;
75
- additions?: number | undefined;
76
- deletions?: number | undefined;
77
- previewImageUrls?: string[] | undefined;
78
- } | {
79
- type: "task";
80
- summary?: string | undefined;
81
- assignees?: string[] | undefined;
82
- priority?: string | undefined;
83
- project?: string | undefined;
84
- cycle?: string | undefined;
85
- dueDate?: string | undefined;
86
- labels?: string[] | undefined;
87
- } | {
88
- type: "deployment";
89
- summary?: string | undefined;
90
- project?: string | undefined;
91
- environment?: string | undefined;
92
- revision?: string | undefined;
93
- branch?: string | undefined;
94
- } | {
95
- type: "calendar_event";
96
- summary?: string | undefined;
97
- when?: string | undefined;
98
- attendees?: string[] | undefined;
99
- } | {
100
- type: "conversation";
101
- summary?: string | undefined;
102
- participants?: string[] | undefined;
103
- lastActivityAt?: string | undefined;
104
- } | {
105
- type: "document";
106
- summary?: string | undefined;
107
- owner?: string | undefined;
108
- modifiedAt?: string | undefined;
109
- } | {
110
- type: "message";
111
- summary?: string | undefined;
112
- channel?: string | undefined;
113
- author?: string | undefined;
114
- sentAt?: string | undefined;
115
- } | {
116
- type: "web_page";
117
- summary?: string | undefined;
118
- siteName?: string | undefined;
119
- author?: string | undefined;
120
- thumbnailUrl?: string | undefined;
121
- } | {
122
- type: "person";
123
- summary?: string | undefined;
124
- email?: string | undefined;
125
- slackHandle?: string | undefined;
126
- githubHandle?: string | undefined;
127
- avatarUrl?: string | undefined;
128
- } | undefined;
129
- }[] | undefined;
130
- reply?: {
131
- text: string;
132
- url?: string | undefined;
133
- } | undefined;
134
- truncated?: boolean | undefined;
135
- continuation?: {
136
- arguments: Record<string, unknown>;
137
- reason?: string | undefined;
138
- } | undefined;
139
- target: "updatePullRequestFeedback";
140
- repo: string;
141
- comment_id: number;
142
- status: "addressed" | "declined";
143
- }, {
144
- [x: string]: unknown;
145
- objectAnnotations?: {
146
- kind: "object";
147
- key: string;
148
- label: string;
149
- objectType: "automation" | "calendar_event" | "code_change" | "conversation" | "deployment" | "document" | "item" | "message" | "person" | "task" | "web_page";
150
- title: string;
151
- url: string | null;
152
- description?: string | undefined;
153
- status?: string | undefined;
154
- trigger?: string | undefined;
155
- warning?: string | undefined;
156
- displayType?: string | undefined;
157
- sourceUpdatedAt?: string | undefined;
158
- facts?: {
159
- type: "code_change";
160
- summary?: string | undefined;
161
- author?: string | undefined;
162
- sourceBranch?: string | undefined;
163
- targetBranch?: string | undefined;
164
- reviewers?: string[] | undefined;
165
- review?: "approved" | "changes_requested" | "required" | undefined;
166
- checks?: {
167
- passed: number;
168
- failed: number;
169
- pending: number;
170
- } | undefined;
171
- mergeable?: boolean | undefined;
172
- changedFiles?: number | undefined;
173
- additions?: number | undefined;
174
- deletions?: number | undefined;
175
- previewImageUrls?: string[] | undefined;
176
- } | {
177
- type: "task";
178
- summary?: string | undefined;
179
- assignees?: string[] | undefined;
180
- priority?: string | undefined;
181
- project?: string | undefined;
182
- cycle?: string | undefined;
183
- dueDate?: string | undefined;
184
- labels?: string[] | undefined;
185
- } | {
186
- type: "deployment";
187
- summary?: string | undefined;
188
- project?: string | undefined;
189
- environment?: string | undefined;
190
- revision?: string | undefined;
191
- branch?: string | undefined;
192
- } | {
193
- type: "calendar_event";
194
- summary?: string | undefined;
195
- when?: string | undefined;
196
- attendees?: string[] | undefined;
197
- } | {
198
- type: "conversation";
199
- summary?: string | undefined;
200
- participants?: string[] | undefined;
201
- lastActivityAt?: string | undefined;
202
- } | {
203
- type: "document";
204
- summary?: string | undefined;
205
- owner?: string | undefined;
206
- modifiedAt?: string | undefined;
207
- } | {
208
- type: "message";
209
- summary?: string | undefined;
210
- channel?: string | undefined;
211
- author?: string | undefined;
212
- sentAt?: string | undefined;
213
- } | {
214
- type: "web_page";
215
- summary?: string | undefined;
216
- siteName?: string | undefined;
217
- author?: string | undefined;
218
- thumbnailUrl?: string | undefined;
219
- } | {
220
- type: "person";
221
- summary?: string | undefined;
222
- email?: string | undefined;
223
- slackHandle?: string | undefined;
224
- githubHandle?: string | undefined;
225
- avatarUrl?: string | undefined;
226
- } | undefined;
227
- }[] | undefined;
228
- reply?: {
229
- text: string;
230
- url?: string | undefined;
231
- } | undefined;
232
- truncated?: boolean | undefined;
233
- continuation?: {
234
- arguments: Record<string, unknown>;
235
- reason?: string | undefined;
236
- } | undefined;
237
- target: "updatePullRequestFeedback";
238
- repo: string;
239
- comment_id: number;
240
- status: "addressed" | "declined";
241
- }>;
242
- export {};