@sentry/junior-github 0.301.0 → 0.302.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 (48) hide show
  1. package/dist/{chunk-YUF5P5I7.js → chunk-6SOJ5TN6.js} +142 -31
  2. package/dist/clone-command.d.ts +2 -0
  3. package/dist/db/schema.d.ts +23 -14
  4. package/dist/draft-readiness.d.ts +31 -0
  5. package/dist/events/pull-request.d.ts +1 -1
  6. package/dist/events/repository.d.ts +1 -1
  7. package/dist/graphql-documents.d.ts +13 -0
  8. package/dist/hooks-path-command.d.ts +5 -0
  9. package/dist/index.js +2060 -1699
  10. package/dist/merge-conflict-checks/heartbeat.d.ts +9 -5
  11. package/dist/merge-conflict-checks/policy.d.ts +74 -0
  12. package/dist/pull-request-outcomes/reconcile.d.ts +2 -1
  13. package/dist/pull-request-outcomes/store.d.ts +15 -10
  14. package/dist/testing.js +1 -1
  15. package/dist/tool-support/github-text.d.ts +2 -2
  16. package/dist/tools/clone-repository.d.ts +89 -7
  17. package/dist/tools/comment-on-issue.d.ts +87 -3
  18. package/dist/tools/comment-on-pull-request.d.ts +87 -3
  19. package/dist/tools/create-issue.d.ts +86 -4
  20. package/dist/tools/create-pull-request.d.ts +88 -6
  21. package/dist/tools/get-deployment.d.ts +90 -8
  22. package/dist/tools/get-issue.d.ts +98 -16
  23. package/dist/tools/get-pull-request.d.ts +112 -9
  24. package/dist/tools/get-release.d.ts +90 -8
  25. package/dist/tools/get-repository.d.ts +90 -8
  26. package/dist/tools/get-status.d.ts +87 -5
  27. package/dist/tools/react-to-issue.d.ts +87 -3
  28. package/dist/tools/resolve-pull-request-review-thread.d.ts +87 -5
  29. package/dist/tools/submit-pull-request-review.d.ts +87 -3
  30. package/dist/tools/update-issue-comment.d.ts +87 -3
  31. package/dist/tools/update-issue.d.ts +106 -24
  32. package/dist/tools/update-pull-request-feedback.d.ts +87 -5
  33. package/dist/tools/update-pull-request.d.ts +109 -26
  34. package/dist/tools.d.ts +3 -3
  35. package/dist/webhooks/check-suite.d.ts +30 -3
  36. package/dist/webhooks/handler.d.ts +2 -0
  37. package/dist/webhooks/installation-requests.d.ts +8 -1
  38. package/dist/webhooks/merge-conflict.d.ts +7 -2
  39. package/dist/webhooks/pull-request-action.d.ts +37 -0
  40. package/migrations/0012_pull_request_next_action.sql +5 -0
  41. package/migrations/meta/0012_snapshot.json +434 -0
  42. package/migrations/meta/_journal.json +7 -0
  43. package/package.json +3 -2
  44. package/skills/github-code/SKILL.md +1 -1
  45. package/skills/github-code/SPEC.md +2 -2
  46. package/skills/github-code/references/workflow.md +1 -1
  47. package/dist/webhooks/pull-request-ready.d.ts +0 -31
  48. package/dist/webhooks/pull-request-review-request.d.ts +0 -32
@@ -0,0 +1,434 @@
1
+ {
2
+ "id": "055a183e-3fe9-4077-a93f-6fd5f0786389",
3
+ "prevId": "7b0a99a8-d5c9-4810-a220-3b6c8517c9cf",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.junior_github_issues": {
8
+ "name": "junior_github_issues",
9
+ "schema": "",
10
+ "columns": {
11
+ "issue_id": {
12
+ "name": "issue_id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "repository_id": {
18
+ "name": "repository_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "repository_full_name": {
24
+ "name": "repository_full_name",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "number": {
30
+ "name": "number",
31
+ "type": "integer",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "state": {
36
+ "name": "state",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "state_reason": {
42
+ "name": "state_reason",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "conversation_ids": {
48
+ "name": "conversation_ids",
49
+ "type": "text[]",
50
+ "primaryKey": false,
51
+ "notNull": true,
52
+ "default": "ARRAY[]::text[]"
53
+ },
54
+ "opened_at": {
55
+ "name": "opened_at",
56
+ "type": "timestamp with time zone",
57
+ "primaryKey": false,
58
+ "notNull": true
59
+ },
60
+ "closed_at": {
61
+ "name": "closed_at",
62
+ "type": "timestamp with time zone",
63
+ "primaryKey": false,
64
+ "notNull": false
65
+ },
66
+ "updated_at": {
67
+ "name": "updated_at",
68
+ "type": "timestamp with time zone",
69
+ "primaryKey": false,
70
+ "notNull": true
71
+ }
72
+ },
73
+ "indexes": {
74
+ "junior_github_issues_opened_at_idx": {
75
+ "name": "junior_github_issues_opened_at_idx",
76
+ "columns": [
77
+ {
78
+ "expression": "opened_at",
79
+ "isExpression": false,
80
+ "asc": true,
81
+ "nulls": "last"
82
+ }
83
+ ],
84
+ "isUnique": false,
85
+ "concurrently": false,
86
+ "method": "btree",
87
+ "with": {}
88
+ },
89
+ "junior_github_issues_closed_at_idx": {
90
+ "name": "junior_github_issues_closed_at_idx",
91
+ "columns": [
92
+ {
93
+ "expression": "closed_at",
94
+ "isExpression": false,
95
+ "asc": true,
96
+ "nulls": "last"
97
+ }
98
+ ],
99
+ "isUnique": false,
100
+ "concurrently": false,
101
+ "method": "btree",
102
+ "with": {}
103
+ },
104
+ "junior_github_issues_open_idx": {
105
+ "name": "junior_github_issues_open_idx",
106
+ "columns": [
107
+ {
108
+ "expression": "issue_id",
109
+ "isExpression": false,
110
+ "asc": true,
111
+ "nulls": "last"
112
+ }
113
+ ],
114
+ "isUnique": false,
115
+ "where": "\"junior_github_issues\".\"state\" = 'open'",
116
+ "concurrently": false,
117
+ "method": "btree",
118
+ "with": {}
119
+ }
120
+ },
121
+ "foreignKeys": {},
122
+ "compositePrimaryKeys": {},
123
+ "uniqueConstraints": {},
124
+ "policies": {},
125
+ "checkConstraints": {},
126
+ "isRLSEnabled": false
127
+ },
128
+ "public.junior_github_pull_request_issues": {
129
+ "name": "junior_github_pull_request_issues",
130
+ "schema": "",
131
+ "columns": {
132
+ "pull_request_id": {
133
+ "name": "pull_request_id",
134
+ "type": "text",
135
+ "primaryKey": false,
136
+ "notNull": true
137
+ },
138
+ "issue_repository_full_name": {
139
+ "name": "issue_repository_full_name",
140
+ "type": "text",
141
+ "primaryKey": false,
142
+ "notNull": true
143
+ },
144
+ "issue_number": {
145
+ "name": "issue_number",
146
+ "type": "integer",
147
+ "primaryKey": false,
148
+ "notNull": true
149
+ }
150
+ },
151
+ "indexes": {},
152
+ "foreignKeys": {
153
+ "junior_github_pull_request_issues_pull_request_id_junior_github_pull_requests_pull_request_id_fk": {
154
+ "name": "junior_github_pull_request_issues_pull_request_id_junior_github_pull_requests_pull_request_id_fk",
155
+ "tableFrom": "junior_github_pull_request_issues",
156
+ "tableTo": "junior_github_pull_requests",
157
+ "columnsFrom": ["pull_request_id"],
158
+ "columnsTo": ["pull_request_id"],
159
+ "onDelete": "cascade",
160
+ "onUpdate": "no action"
161
+ }
162
+ },
163
+ "compositePrimaryKeys": {
164
+ "junior_github_pull_request_issues_pull_request_id_issue_repository_full_name_issue_number_pk": {
165
+ "name": "junior_github_pull_request_issues_pull_request_id_issue_repository_full_name_issue_number_pk",
166
+ "columns": [
167
+ "pull_request_id",
168
+ "issue_repository_full_name",
169
+ "issue_number"
170
+ ]
171
+ }
172
+ },
173
+ "uniqueConstraints": {},
174
+ "policies": {},
175
+ "checkConstraints": {},
176
+ "isRLSEnabled": false
177
+ },
178
+ "public.junior_github_pull_request_requesters": {
179
+ "name": "junior_github_pull_request_requesters",
180
+ "schema": "",
181
+ "columns": {
182
+ "repository_full_name": {
183
+ "name": "repository_full_name",
184
+ "type": "text",
185
+ "primaryKey": false,
186
+ "notNull": true
187
+ },
188
+ "number": {
189
+ "name": "number",
190
+ "type": "integer",
191
+ "primaryKey": false,
192
+ "notNull": true
193
+ },
194
+ "identity_id": {
195
+ "name": "identity_id",
196
+ "type": "text",
197
+ "primaryKey": false,
198
+ "notNull": true
199
+ },
200
+ "conversation_id": {
201
+ "name": "conversation_id",
202
+ "type": "text",
203
+ "primaryKey": false,
204
+ "notNull": false
205
+ },
206
+ "created_at": {
207
+ "name": "created_at",
208
+ "type": "timestamp with time zone",
209
+ "primaryKey": false,
210
+ "notNull": true
211
+ },
212
+ "updated_at": {
213
+ "name": "updated_at",
214
+ "type": "timestamp with time zone",
215
+ "primaryKey": false,
216
+ "notNull": true
217
+ }
218
+ },
219
+ "indexes": {},
220
+ "foreignKeys": {},
221
+ "compositePrimaryKeys": {
222
+ "junior_github_pull_request_requesters_repository_full_name_number_identity_id_pk": {
223
+ "name": "junior_github_pull_request_requesters_repository_full_name_number_identity_id_pk",
224
+ "columns": ["repository_full_name", "number", "identity_id"]
225
+ }
226
+ },
227
+ "uniqueConstraints": {},
228
+ "policies": {},
229
+ "checkConstraints": {},
230
+ "isRLSEnabled": false
231
+ },
232
+ "public.junior_github_pull_requests": {
233
+ "name": "junior_github_pull_requests",
234
+ "schema": "",
235
+ "columns": {
236
+ "pull_request_id": {
237
+ "name": "pull_request_id",
238
+ "type": "text",
239
+ "primaryKey": true,
240
+ "notNull": true
241
+ },
242
+ "repository_id": {
243
+ "name": "repository_id",
244
+ "type": "text",
245
+ "primaryKey": false,
246
+ "notNull": true
247
+ },
248
+ "repository_full_name": {
249
+ "name": "repository_full_name",
250
+ "type": "text",
251
+ "primaryKey": false,
252
+ "notNull": true
253
+ },
254
+ "number": {
255
+ "name": "number",
256
+ "type": "integer",
257
+ "primaryKey": false,
258
+ "notNull": true
259
+ },
260
+ "state": {
261
+ "name": "state",
262
+ "type": "text",
263
+ "primaryKey": false,
264
+ "notNull": true
265
+ },
266
+ "commit_composition": {
267
+ "name": "commit_composition",
268
+ "type": "text",
269
+ "primaryKey": false,
270
+ "notNull": false
271
+ },
272
+ "conversation_ids": {
273
+ "name": "conversation_ids",
274
+ "type": "text[]",
275
+ "primaryKey": false,
276
+ "notNull": true,
277
+ "default": "ARRAY[]::text[]"
278
+ },
279
+ "draft": {
280
+ "name": "draft",
281
+ "type": "boolean",
282
+ "primaryKey": false,
283
+ "notNull": true,
284
+ "default": false
285
+ },
286
+ "opened_at": {
287
+ "name": "opened_at",
288
+ "type": "timestamp with time zone",
289
+ "primaryKey": false,
290
+ "notNull": true
291
+ },
292
+ "merged_at": {
293
+ "name": "merged_at",
294
+ "type": "timestamp with time zone",
295
+ "primaryKey": false,
296
+ "notNull": false
297
+ },
298
+ "closed_at": {
299
+ "name": "closed_at",
300
+ "type": "timestamp with time zone",
301
+ "primaryKey": false,
302
+ "notNull": false
303
+ },
304
+ "updated_at": {
305
+ "name": "updated_at",
306
+ "type": "timestamp with time zone",
307
+ "primaryKey": false,
308
+ "notNull": true
309
+ },
310
+ "next_action": {
311
+ "name": "next_action",
312
+ "type": "text",
313
+ "primaryKey": false,
314
+ "notNull": false
315
+ },
316
+ "ready_sync_requests": {
317
+ "name": "ready_sync_requests",
318
+ "type": "integer",
319
+ "primaryKey": false,
320
+ "notNull": true,
321
+ "default": 0
322
+ },
323
+ "ready_sync_id": {
324
+ "name": "ready_sync_id",
325
+ "type": "integer",
326
+ "primaryKey": false,
327
+ "notNull": false
328
+ },
329
+ "ready_sync_at": {
330
+ "name": "ready_sync_at",
331
+ "type": "timestamp with time zone",
332
+ "primaryKey": false,
333
+ "notNull": false
334
+ }
335
+ },
336
+ "indexes": {
337
+ "junior_github_pull_requests_opened_at_idx": {
338
+ "name": "junior_github_pull_requests_opened_at_idx",
339
+ "columns": [
340
+ {
341
+ "expression": "opened_at",
342
+ "isExpression": false,
343
+ "asc": true,
344
+ "nulls": "last"
345
+ }
346
+ ],
347
+ "isUnique": false,
348
+ "concurrently": false,
349
+ "method": "btree",
350
+ "with": {}
351
+ },
352
+ "junior_github_pull_requests_merged_at_idx": {
353
+ "name": "junior_github_pull_requests_merged_at_idx",
354
+ "columns": [
355
+ {
356
+ "expression": "merged_at",
357
+ "isExpression": false,
358
+ "asc": true,
359
+ "nulls": "last"
360
+ }
361
+ ],
362
+ "isUnique": false,
363
+ "concurrently": false,
364
+ "method": "btree",
365
+ "with": {}
366
+ },
367
+ "junior_github_pull_requests_closed_at_idx": {
368
+ "name": "junior_github_pull_requests_closed_at_idx",
369
+ "columns": [
370
+ {
371
+ "expression": "closed_at",
372
+ "isExpression": false,
373
+ "asc": true,
374
+ "nulls": "last"
375
+ }
376
+ ],
377
+ "isUnique": false,
378
+ "concurrently": false,
379
+ "method": "btree",
380
+ "with": {}
381
+ },
382
+ "junior_github_pull_requests_open_idx": {
383
+ "name": "junior_github_pull_requests_open_idx",
384
+ "columns": [
385
+ {
386
+ "expression": "pull_request_id",
387
+ "isExpression": false,
388
+ "asc": true,
389
+ "nulls": "last"
390
+ }
391
+ ],
392
+ "isUnique": false,
393
+ "where": "\"junior_github_pull_requests\".\"state\" = 'open'",
394
+ "concurrently": false,
395
+ "method": "btree",
396
+ "with": {}
397
+ },
398
+ "junior_github_pull_requests_unmerged_conversations_idx": {
399
+ "name": "junior_github_pull_requests_unmerged_conversations_idx",
400
+ "columns": [
401
+ {
402
+ "expression": "conversation_ids",
403
+ "isExpression": false,
404
+ "asc": true,
405
+ "nulls": "last"
406
+ }
407
+ ],
408
+ "isUnique": false,
409
+ "where": "\"junior_github_pull_requests\".\"state\" <> 'merged'",
410
+ "concurrently": false,
411
+ "method": "gin",
412
+ "with": {}
413
+ }
414
+ },
415
+ "foreignKeys": {},
416
+ "compositePrimaryKeys": {},
417
+ "uniqueConstraints": {},
418
+ "policies": {},
419
+ "checkConstraints": {},
420
+ "isRLSEnabled": false
421
+ }
422
+ },
423
+ "enums": {},
424
+ "schemas": {},
425
+ "sequences": {},
426
+ "roles": {},
427
+ "policies": {},
428
+ "views": {},
429
+ "_meta": {
430
+ "columns": {},
431
+ "schemas": {},
432
+ "tables": {}
433
+ }
434
+ }
@@ -85,6 +85,13 @@
85
85
  "when": 1794493724681,
86
86
  "tag": "0011_pull_request_draft",
87
87
  "breakpoints": true
88
+ },
89
+ {
90
+ "idx": 12,
91
+ "version": "7",
92
+ "when": 1794605938191,
93
+ "tag": "0012_pull_request_next_action",
94
+ "breakpoints": true
88
95
  }
89
96
  ]
90
97
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-github",
3
- "version": "0.301.0",
3
+ "version": "0.302.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -31,13 +31,14 @@
31
31
  "@0no-co/graphql.web": "^1.3.4",
32
32
  "@sinclair/typebox": "^0.34.49",
33
33
  "drizzle-orm": "^0.45.4",
34
+ "ignore": "^7.0.5",
34
35
  "marked": "^18.1.2",
35
36
  "mdast-util-from-markdown": "^2.0.3",
36
37
  "mdast-util-gfm": "^3.1.0",
37
38
  "micromark-extension-gfm": "^3.0.0",
38
39
  "parse5": "^7.3.0",
39
40
  "zod": "^4.6.7",
40
- "@sentry/junior-plugin-api": "0.301.0"
41
+ "@sentry/junior-plugin-api": "0.302.0"
41
42
  },
42
43
  "devDependencies": {
43
44
  "@oxlint/plugins": "1.79.0",
@@ -37,7 +37,7 @@ Use `git` and `gh` for repository work.
37
37
  - When an error names a tool, use it. Change permissions only when GitHub rejected the request.
38
38
  - Stop for an unclear target, missing access, destructive work, or a GitHub permission failure.
39
39
  - Code changes always end in a pushed branch and a PR. Do not ask whether to open one. Skip it only when the user opts out or asks for investigation only.
40
- - Open the PR ready for review when the work is complete and the checks pass. Open a draft when work, checks, or decisions remain. A scope or follow-up question is not a reason to stop: open the PR, and name the question in the PR body and the report. Name each open decision of a draft in its PR body: when the required checks pass, the Watch marks a draft with no open decision ready for review.
40
+ - Open the PR as a draft, unless the requester asks for a ready PR. A scope or follow-up question is not a reason to stop: open the PR, and name the question in the PR body and the report. Name each open decision of a draft in its PR body: when the required checks pass, the Watch marks a draft with no open decision ready for review. It checks the changed files against CODEOWNERS first: a draft that would ask code owners to review, or whose repo's `AGENTS.md` asks for drafts, stays a draft, and the Watch tells the requester that it waits for their review.
41
41
  - Link the PR. Mention checks only when they failed or were skipped.
42
42
  - The runtime adds the requester `via` line. Do not write one.
43
43
  - Credit other people, such as a reporter, by GitHub `@login` so GitHub notifies them. Get the login from `userLookup` (`linked_identities` with provider `github`, else a GitHub link in `profile_fields`). Pass the Slack user ID when known. With no login, write the name. Never guess a login. When you delegate the write, put the `@login` in the brief.
@@ -10,8 +10,8 @@ Guide evidence-first GitHub repository work from inspection through a reviewable
10
10
  - Preserve unrelated work; reject destructive Git operations except `--force-with-lease` pushes to branches Junior pushed or the requester named.
11
11
  - Treat shallow clones as inspection checkouts; deepen before history work; never force-push around missing ancestry.
12
12
  - Install dependencies with the lockfile frozen mode before verification when needed.
13
- - Finish every code change with a pushed PR, without asking, unless the user opts out or asked for investigation only. Open it ready when work and checks are done; open a draft when work, checks, or decisions remain. An open scope question goes in the PR body, not in a stop. The Watch of a draft marks it ready when its required checks pass and no decision is open, so open decisions of a draft go in its PR body.
14
- - After each push to a branch with an open PR, check mergeability. Resolve conflicts without asking, by merging the PR base branch (usually the default branch). Never rebase for this, except in a stack: a stack merges only with a linear history, so stacked PRs restack with `gh stack`. GitHub sends no event for a new conflict, and conflicted PRs get no new checks. The plugin publishes `pull_request.merge_conflict` for a watched PR only when another webhook event arrives for it, so the post-push check stays.
13
+ - Finish every code change with a pushed PR, without asking, unless the user opts out or asked for investigation only. Open it as a draft unless the requester asks for a ready PR: opening a PR ready asks its code owners at once, and only the draft Watch checks the changed files against CODEOWNERS. An open scope question goes in the PR body, not in a stop. The Watch of a draft marks it ready when its required checks pass and no decision is open, so open decisions of a draft go in its PR body. A draft whose changed files have CODEOWNERS owners, or whose repo's root AGENTS.md asks for draft PRs or for a person to mark them ready, stays a draft unless the requester said to mark it ready, and Junior tells the requester that it waits for their review.
14
+ - After each push to a branch with an open PR, check mergeability. Resolve conflicts without asking, by merging the PR base branch (usually the default branch). Never rebase for this, except in a stack: a stack merges only with a linear history, so stacked PRs restack with `gh stack`. GitHub sends no event for a new conflict, and conflicted PRs get no new checks. The plugin publishes `pull_request.merge_conflict` for a watched PR only when another webhook event arrives for it, and for a Junior PR only while people work on it and never for a draft, so the post-push check stays.
15
15
  - Write conventional PR titles and short plain-English bodies; keep check results out of the PR body.
16
16
  - Report exact validation and permission failures.
17
17
  - For 5xx, timeout, and connection failures, and for stalled or unexplained check failures, check GitHub status with `github_getStatus` (or the incidents on a `pull_request.checks.failed` event) before diagnosing. Report a matching incident as the likely cause; with no match, do not blame an outage.
@@ -42,7 +42,7 @@ Open this when making repository edits, not for read-only inspection.
42
42
  - Not in a stack: GitHub checks mergeability against the PR base (`baseRefName`), which is usually the default branch. Fetch the base and merge `origin/BASE` into the PR branch. Do not rebase. Resolve each conflict so that both the PR change and the base branch change stay intact. Run the checks again and push.
43
43
  - Then check mergeability again.
44
44
  4. Resolve the actual default branch.
45
- 5. Update an existing PR for the branch with `github_updatePullRequest`, or create with `github_createPullRequest` (`draft: true` only when work, checks, or decisions remain; otherwise ready for review).
45
+ 5. Update an existing PR for the branch with `github_updatePullRequest`, or create with `github_createPullRequest` (`draft: true` unless the requester asked for a ready PR).
46
46
  6. PR title matches the current dominant change, same conventional form as commits.
47
47
  7. PR body: short, plain English, what changed and why. Only context the diff cannot show. No empty sections, file lists, commit logs, or Checks/Verification/Test plan blocks.
48
48
  8. After material follow-up commits, refresh title and body against the current diff.
@@ -1,31 +0,0 @@
1
- /**
2
- * The "ready to merge" notice on the review desk for a Junior pull request.
3
- *
4
- * A pull request is ready to merge when it is open, not a draft, approved,
5
- * and GitHub's merge state is `clean`. With auto-merge on, GitHub merges it,
6
- * so no person needs the notice. Each webhook that can change one of
7
- * these facts reads them again from GitHub. The notice goes to the
8
- * Conversation where a person asked Junior to open the pull request. It is
9
- * assigned to that person only when they are in that Conversation, and it
10
- * waits on them: the merge is their step. It closes when the pull request
11
- * merges, closes, or is no longer ready.
12
- */
13
- import type { PluginConversationReviewItems, PluginLogger } from "@sentry/junior-plugin-api";
14
- import type { GitHubDb } from "../db/database.js";
15
- import { type GitHubInstallationEnv } from "./installation-requests.js";
16
- import type { GitHubPullRequestTarget } from "./pull-request-people.js";
17
- /** Return the pull requests whose readiness one webhook delivery can change. */
18
- export declare function pullRequestReadyTargets(eventName: string, body: unknown): GitHubPullRequestTarget[];
19
- /**
20
- * Add or close the "ready to merge" notice of each Junior pull request that a
21
- * webhook delivery can change. The notice is optional, so a failure is logged
22
- * and does not fail the delivery.
23
- */
24
- export declare function syncGitHubPullRequestReadyNotices(args: {
25
- db: GitHubDb;
26
- deliveryId: string;
27
- env: GitHubInstallationEnv;
28
- log?: Pick<PluginLogger, "error" | "warn">;
29
- reviewItems: PluginConversationReviewItems;
30
- targets: GitHubPullRequestTarget[];
31
- }): Promise<void>;
@@ -1,32 +0,0 @@
1
- /**
2
- * The "review requested" ask on the review desk for a Junior pull request.
3
- *
4
- * When GitHub asks the requester for a review on a pull request that they
5
- * asked Junior to open, the ask goes to the Conversation where they asked.
6
- * It is assigned to them only when they are in that Conversation, and it
7
- * waits on them. It closes when they submit a review, when the request is
8
- * removed, or when the pull request closes. Reopening the pull request adds
9
- * it again while their request is still open, because GitHub does not send
10
- * a new request for it. GitHub sends each of these facts in the webhook, so
11
- * the ask needs no GitHub read and no saved state.
12
- *
13
- * Only the requester can get the ask. Junior maps a GitHub login to a person
14
- * only through the requester's linked GitHub account, and other pull
15
- * requests have no Conversation for the ask.
16
- */
17
- import type { PluginConversationReviewItems, PluginLogger } from "@sentry/junior-plugin-api";
18
- import type { GitHubDb } from "../db/database.js";
19
- /**
20
- * Add or close the "review requested" ask of a Junior pull request when one
21
- * webhook delivery changes the review request of its requester. The ask is
22
- * optional, so a failure is logged and does not fail the delivery.
23
- */
24
- export declare function syncGitHubPullRequestReviewRequest(args: {
25
- body: unknown;
26
- db: GitHubDb;
27
- deliveryId: string;
28
- eventName: string;
29
- loadGitHubLogin?(identityId: string): Promise<string | undefined>;
30
- log?: Pick<PluginLogger, "error">;
31
- reviewItems: PluginConversationReviewItems;
32
- }): Promise<void>;