pr-merge-queue 0.0.0-stage → 0.0.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/LICENSE +201 -0
- package/README.md +125 -2
- package/dist/claim-pr/claim-pr.d.mts +45 -0
- package/dist/claim-pr/claim-pr.d.mts.map +1 -0
- package/dist/claim-pr/claim-pr.mjs +217 -0
- package/dist/claim-pr/claim-pr.mjs.map +1 -0
- package/dist/claim-pr/index.d.mts +2 -0
- package/dist/claim-pr/index.d.mts.map +1 -0
- package/dist/claim-pr/index.mjs +2 -0
- package/dist/claim-pr/index.mjs.map +1 -0
- package/dist/cmd/claim-pr.d.mts +3 -0
- package/dist/cmd/claim-pr.d.mts.map +1 -0
- package/dist/cmd/claim-pr.mjs +20 -0
- package/dist/cmd/claim-pr.mjs.map +1 -0
- package/dist/cmd/open-pr.d.mts +3 -0
- package/dist/cmd/open-pr.d.mts.map +1 -0
- package/dist/cmd/open-pr.mjs +20 -0
- package/dist/cmd/open-pr.mjs.map +1 -0
- package/dist/cmd/pr-report.d.mts +3 -0
- package/dist/cmd/pr-report.d.mts.map +1 -0
- package/dist/cmd/pr-report.mjs +20 -0
- package/dist/cmd/pr-report.mjs.map +1 -0
- package/dist/cmd/push-fixed-pr.d.mts +3 -0
- package/dist/cmd/push-fixed-pr.d.mts.map +1 -0
- package/dist/cmd/push-fixed-pr.mjs +20 -0
- package/dist/cmd/push-fixed-pr.mjs.map +1 -0
- package/dist/cmd/report-unowned-prs.d.mts +3 -0
- package/dist/cmd/report-unowned-prs.d.mts.map +1 -0
- package/dist/cmd/report-unowned-prs.mjs +20 -0
- package/dist/cmd/report-unowned-prs.mjs.map +1 -0
- package/dist/cmd/unblock-prs.d.mts +3 -0
- package/dist/cmd/unblock-prs.d.mts.map +1 -0
- package/dist/cmd/unblock-prs.mjs +19 -0
- package/dist/cmd/unblock-prs.mjs.map +1 -0
- package/dist/entry-point.d.mts +3 -0
- package/dist/entry-point.d.mts.map +1 -0
- package/dist/entry-point.mjs +3 -0
- package/dist/entry-point.mjs.map +1 -0
- package/dist/lib/cli-args.d.mts +27 -0
- package/dist/lib/cli-args.d.mts.map +1 -0
- package/dist/lib/cli-args.mjs +55 -0
- package/dist/lib/cli-args.mjs.map +1 -0
- package/dist/lib/github-api.d.mts +153 -0
- package/dist/lib/github-api.d.mts.map +1 -0
- package/dist/lib/github-api.mjs +291 -0
- package/dist/lib/github-api.mjs.map +1 -0
- package/dist/lib/index.d.mts +7 -0
- package/dist/lib/index.d.mts.map +1 -0
- package/dist/lib/index.mjs +7 -0
- package/dist/lib/index.mjs.map +1 -0
- package/dist/lib/json.d.mts +12 -0
- package/dist/lib/json.d.mts.map +1 -0
- package/dist/lib/json.mjs +28 -0
- package/dist/lib/json.mjs.map +1 -0
- package/dist/lib/log.d.mts +10 -0
- package/dist/lib/log.d.mts.map +1 -0
- package/dist/lib/log.mjs +13 -0
- package/dist/lib/log.mjs.map +1 -0
- package/dist/lib/shell.d.mts +18 -0
- package/dist/lib/shell.d.mts.map +1 -0
- package/dist/lib/shell.mjs +42 -0
- package/dist/lib/shell.mjs.map +1 -0
- package/dist/lib/time.d.mts +17 -0
- package/dist/lib/time.d.mts.map +1 -0
- package/dist/lib/time.mjs +35 -0
- package/dist/lib/time.mjs.map +1 -0
- package/dist/open-pr/github.d.mts +72 -0
- package/dist/open-pr/github.d.mts.map +1 -0
- package/dist/open-pr/github.mjs +249 -0
- package/dist/open-pr/github.mjs.map +1 -0
- package/dist/open-pr/index.d.mts +6 -0
- package/dist/open-pr/index.d.mts.map +1 -0
- package/dist/open-pr/index.mjs +6 -0
- package/dist/open-pr/index.mjs.map +1 -0
- package/dist/open-pr/main.d.mts +36 -0
- package/dist/open-pr/main.d.mts.map +1 -0
- package/dist/open-pr/main.mjs +204 -0
- package/dist/open-pr/main.mjs.map +1 -0
- package/dist/open-pr/options.d.mts +20 -0
- package/dist/open-pr/options.d.mts.map +1 -0
- package/dist/open-pr/options.mjs +66 -0
- package/dist/open-pr/options.mjs.map +1 -0
- package/dist/open-pr/steps.d.mts +23 -0
- package/dist/open-pr/steps.d.mts.map +1 -0
- package/dist/open-pr/steps.mjs +38 -0
- package/dist/open-pr/steps.mjs.map +1 -0
- package/dist/open-pr/types.d.mts +179 -0
- package/dist/open-pr/types.d.mts.map +1 -0
- package/dist/open-pr/types.mjs +20 -0
- package/dist/open-pr/types.mjs.map +1 -0
- package/dist/pr-report/github.d.mts +59 -0
- package/dist/pr-report/github.d.mts.map +1 -0
- package/dist/pr-report/github.mjs +561 -0
- package/dist/pr-report/github.mjs.map +1 -0
- package/dist/pr-report/index.d.mts +8 -0
- package/dist/pr-report/index.d.mts.map +1 -0
- package/dist/pr-report/index.mjs +8 -0
- package/dist/pr-report/index.mjs.map +1 -0
- package/dist/pr-report/linked-issues.d.mts +15 -0
- package/dist/pr-report/linked-issues.d.mts.map +1 -0
- package/dist/pr-report/linked-issues.mjs +39 -0
- package/dist/pr-report/linked-issues.mjs.map +1 -0
- package/dist/pr-report/main.d.mts +42 -0
- package/dist/pr-report/main.d.mts.map +1 -0
- package/dist/pr-report/main.mjs +163 -0
- package/dist/pr-report/main.mjs.map +1 -0
- package/dist/pr-report/options.d.mts +36 -0
- package/dist/pr-report/options.d.mts.map +1 -0
- package/dist/pr-report/options.mjs +90 -0
- package/dist/pr-report/options.mjs.map +1 -0
- package/dist/pr-report/queue.d.mts +28 -0
- package/dist/pr-report/queue.d.mts.map +1 -0
- package/dist/pr-report/queue.mjs +74 -0
- package/dist/pr-report/queue.mjs.map +1 -0
- package/dist/pr-report/render.d.mts +14 -0
- package/dist/pr-report/render.d.mts.map +1 -0
- package/dist/pr-report/render.mjs +318 -0
- package/dist/pr-report/render.mjs.map +1 -0
- package/dist/pr-report/repo-settings.d.mts +12 -0
- package/dist/pr-report/repo-settings.d.mts.map +1 -0
- package/dist/pr-report/repo-settings.mjs +22 -0
- package/dist/pr-report/repo-settings.mjs.map +1 -0
- package/dist/push-fixed-pr/index.d.mts +2 -0
- package/dist/push-fixed-pr/index.d.mts.map +1 -0
- package/dist/push-fixed-pr/index.mjs +2 -0
- package/dist/push-fixed-pr/index.mjs.map +1 -0
- package/dist/push-fixed-pr/push-fixed-pr.d.mts +54 -0
- package/dist/push-fixed-pr/push-fixed-pr.d.mts.map +1 -0
- package/dist/push-fixed-pr/push-fixed-pr.mjs +172 -0
- package/dist/push-fixed-pr/push-fixed-pr.mjs.map +1 -0
- package/dist/report-unowned-prs/index.d.mts +2 -0
- package/dist/report-unowned-prs/index.d.mts.map +1 -0
- package/dist/report-unowned-prs/index.mjs +2 -0
- package/dist/report-unowned-prs/index.mjs.map +1 -0
- package/dist/report-unowned-prs/report-unowned-prs.d.mts +49 -0
- package/dist/report-unowned-prs/report-unowned-prs.d.mts.map +1 -0
- package/dist/report-unowned-prs/report-unowned-prs.mjs +127 -0
- package/dist/report-unowned-prs/report-unowned-prs.mjs.map +1 -0
- package/dist/tsconfig.json +1 -0
- package/dist/unblock-prs/auto-fix.d.mts +45 -0
- package/dist/unblock-prs/auto-fix.d.mts.map +1 -0
- package/dist/unblock-prs/auto-fix.mjs +207 -0
- package/dist/unblock-prs/auto-fix.mjs.map +1 -0
- package/dist/unblock-prs/checks.d.mts +307 -0
- package/dist/unblock-prs/checks.d.mts.map +1 -0
- package/dist/unblock-prs/checks.mjs +372 -0
- package/dist/unblock-prs/checks.mjs.map +1 -0
- package/dist/unblock-prs/claims.d.mts +21 -0
- package/dist/unblock-prs/claims.d.mts.map +1 -0
- package/dist/unblock-prs/claims.mjs +23 -0
- package/dist/unblock-prs/claims.mjs.map +1 -0
- package/dist/unblock-prs/config.d.mts +487 -0
- package/dist/unblock-prs/config.d.mts.map +1 -0
- package/dist/unblock-prs/config.mjs +119 -0
- package/dist/unblock-prs/config.mjs.map +1 -0
- package/dist/unblock-prs/constants.d.mts +28 -0
- package/dist/unblock-prs/constants.d.mts.map +1 -0
- package/dist/unblock-prs/constants.mjs +28 -0
- package/dist/unblock-prs/constants.mjs.map +1 -0
- package/dist/unblock-prs/demotions.d.mts +42 -0
- package/dist/unblock-prs/demotions.d.mts.map +1 -0
- package/dist/unblock-prs/demotions.mjs +50 -0
- package/dist/unblock-prs/demotions.mjs.map +1 -0
- package/dist/unblock-prs/github.d.mts +739 -0
- package/dist/unblock-prs/github.d.mts.map +1 -0
- package/dist/unblock-prs/github.mjs +626 -0
- package/dist/unblock-prs/github.mjs.map +1 -0
- package/dist/unblock-prs/index.d.mts +25 -0
- package/dist/unblock-prs/index.d.mts.map +1 -0
- package/dist/unblock-prs/index.mjs +25 -0
- package/dist/unblock-prs/index.mjs.map +1 -0
- package/dist/unblock-prs/labels.d.mts +49 -0
- package/dist/unblock-prs/labels.d.mts.map +1 -0
- package/dist/unblock-prs/labels.mjs +49 -0
- package/dist/unblock-prs/labels.mjs.map +1 -0
- package/dist/unblock-prs/main.d.mts +179 -0
- package/dist/unblock-prs/main.d.mts.map +1 -0
- package/dist/unblock-prs/main.mjs +640 -0
- package/dist/unblock-prs/main.mjs.map +1 -0
- package/dist/unblock-prs/merge-after.d.mts +46 -0
- package/dist/unblock-prs/merge-after.d.mts.map +1 -0
- package/dist/unblock-prs/merge-after.mjs +65 -0
- package/dist/unblock-prs/merge-after.mjs.map +1 -0
- package/dist/unblock-prs/options.d.mts +35 -0
- package/dist/unblock-prs/options.d.mts.map +1 -0
- package/dist/unblock-prs/options.mjs +88 -0
- package/dist/unblock-prs/options.mjs.map +1 -0
- package/dist/unblock-prs/owner.d.mts +32 -0
- package/dist/unblock-prs/owner.d.mts.map +1 -0
- package/dist/unblock-prs/owner.mjs +63 -0
- package/dist/unblock-prs/owner.mjs.map +1 -0
- package/dist/unblock-prs/quiet.d.mts +21 -0
- package/dist/unblock-prs/quiet.d.mts.map +1 -0
- package/dist/unblock-prs/quiet.mjs +42 -0
- package/dist/unblock-prs/quiet.mjs.map +1 -0
- package/dist/unblock-prs/rebase.d.mts +120 -0
- package/dist/unblock-prs/rebase.d.mts.map +1 -0
- package/dist/unblock-prs/rebase.mjs +576 -0
- package/dist/unblock-prs/rebase.mjs.map +1 -0
- package/dist/unblock-prs/release.d.mts +62 -0
- package/dist/unblock-prs/release.d.mts.map +1 -0
- package/dist/unblock-prs/release.mjs +94 -0
- package/dist/unblock-prs/release.mjs.map +1 -0
- package/dist/unblock-prs/set-aside-comment.d.mts +20 -0
- package/dist/unblock-prs/set-aside-comment.d.mts.map +1 -0
- package/dist/unblock-prs/set-aside-comment.mjs +93 -0
- package/dist/unblock-prs/set-aside-comment.mjs.map +1 -0
- package/dist/unblock-prs/set-aside-detail.d.mts +41 -0
- package/dist/unblock-prs/set-aside-detail.d.mts.map +1 -0
- package/dist/unblock-prs/set-aside-detail.mjs +56 -0
- package/dist/unblock-prs/set-aside-detail.mjs.map +1 -0
- package/dist/unblock-prs/skips.d.mts +85 -0
- package/dist/unblock-prs/skips.d.mts.map +1 -0
- package/dist/unblock-prs/skips.mjs +141 -0
- package/dist/unblock-prs/skips.mjs.map +1 -0
- package/dist/unblock-prs/stack.d.mts +98 -0
- package/dist/unblock-prs/stack.d.mts.map +1 -0
- package/dist/unblock-prs/stack.mjs +141 -0
- package/dist/unblock-prs/stack.mjs.map +1 -0
- package/dist/unblock-prs/triage.d.mts +28 -0
- package/dist/unblock-prs/triage.d.mts.map +1 -0
- package/dist/unblock-prs/triage.mjs +396 -0
- package/dist/unblock-prs/triage.mjs.map +1 -0
- package/dist/unblock-prs/types.d.mts +793 -0
- package/dist/unblock-prs/types.d.mts.map +1 -0
- package/dist/unblock-prs/types.mjs +26 -0
- package/dist/unblock-prs/types.mjs.map +1 -0
- package/dist/unblock-prs/util.d.mts +23 -0
- package/dist/unblock-prs/util.d.mts.map +1 -0
- package/dist/unblock-prs/util.mjs +60 -0
- package/dist/unblock-prs/util.mjs.map +1 -0
- package/dist/unblock-prs/version-pr.d.mts +57 -0
- package/dist/unblock-prs/version-pr.d.mts.map +1 -0
- package/dist/unblock-prs/version-pr.mjs +79 -0
- package/dist/unblock-prs/version-pr.mjs.map +1 -0
- package/dist/unblock-prs/watch.d.mts +17 -0
- package/dist/unblock-prs/watch.d.mts.map +1 -0
- package/dist/unblock-prs/watch.mjs +128 -0
- package/dist/unblock-prs/watch.mjs.map +1 -0
- package/package.json +118 -3
- package/src/claim-pr/claim-pr.mts +380 -0
- package/src/claim-pr/claim-pr.test.mts +176 -0
- package/src/claim-pr/index.mts +1 -0
- package/src/cmd/claim-pr.mts +32 -0
- package/src/cmd/open-pr.mts +28 -0
- package/src/cmd/pr-report.mts +28 -0
- package/src/cmd/push-fixed-pr.mts +36 -0
- package/src/cmd/report-unowned-prs.mts +37 -0
- package/src/cmd/unblock-prs.mts +24 -0
- package/src/entry-point.mts +3 -0
- package/src/lib/cli-args.mts +86 -0
- package/src/lib/cli-args.test.mts +92 -0
- package/src/lib/github-api.mts +463 -0
- package/src/lib/github-api.test.mts +40 -0
- package/src/lib/index.mts +6 -0
- package/src/lib/json.mts +43 -0
- package/src/lib/json.test.mts +34 -0
- package/src/lib/log.mts +19 -0
- package/src/lib/log.test.mts +45 -0
- package/src/lib/shell.mts +52 -0
- package/src/lib/time.mts +49 -0
- package/src/open-pr/README.md +237 -0
- package/src/open-pr/github.mts +444 -0
- package/src/open-pr/index.mts +5 -0
- package/src/open-pr/main.mts +327 -0
- package/src/open-pr/options.mts +101 -0
- package/src/open-pr/options.test.mts +67 -0
- package/src/open-pr/steps.mts +57 -0
- package/src/open-pr/steps.test.mts +59 -0
- package/src/open-pr/types.mts +42 -0
- package/src/pr-report/README.md +244 -0
- package/src/pr-report/github.mts +911 -0
- package/src/pr-report/index.mts +7 -0
- package/src/pr-report/linked-issues.mts +51 -0
- package/src/pr-report/linked-issues.test.mts +65 -0
- package/src/pr-report/main.mts +257 -0
- package/src/pr-report/options.mts +140 -0
- package/src/pr-report/queue.mts +125 -0
- package/src/pr-report/render.mts +428 -0
- package/src/pr-report/render.test.mts +379 -0
- package/src/pr-report/repo-settings.mts +34 -0
- package/src/push-fixed-pr/index.mts +1 -0
- package/src/push-fixed-pr/push-fixed-pr.mts +276 -0
- package/src/push-fixed-pr/push-fixed-pr.test.mts +228 -0
- package/src/report-unowned-prs/index.mts +1 -0
- package/src/report-unowned-prs/report-unowned-prs.mts +190 -0
- package/src/report-unowned-prs/report-unowned-prs.test.mts +87 -0
- package/src/unblock-prs/README.md +1616 -0
- package/src/unblock-prs/auto-fix.mts +334 -0
- package/src/unblock-prs/auto-fix.test.mts +159 -0
- package/src/unblock-prs/checks.mts +538 -0
- package/src/unblock-prs/checks.test.mts +507 -0
- package/src/unblock-prs/claims.mts +33 -0
- package/src/unblock-prs/claims.test.mts +64 -0
- package/src/unblock-prs/config.mts +187 -0
- package/src/unblock-prs/config.schema.json +71 -0
- package/src/unblock-prs/config.test.mts +139 -0
- package/src/unblock-prs/constants.mts +33 -0
- package/src/unblock-prs/demotions.mts +73 -0
- package/src/unblock-prs/demotions.test.mts +100 -0
- package/src/unblock-prs/github.mts +1042 -0
- package/src/unblock-prs/github.test.mts +84 -0
- package/src/unblock-prs/index.mts +24 -0
- package/src/unblock-prs/labels.mts +70 -0
- package/src/unblock-prs/main.mts +1051 -0
- package/src/unblock-prs/merge-after.mts +117 -0
- package/src/unblock-prs/merge-after.test.mts +120 -0
- package/src/unblock-prs/options.mts +157 -0
- package/src/unblock-prs/owner.mts +91 -0
- package/src/unblock-prs/owner.test.mts +114 -0
- package/src/unblock-prs/quiet.mts +62 -0
- package/src/unblock-prs/quiet.test.mts +175 -0
- package/src/unblock-prs/rebase.mts +962 -0
- package/src/unblock-prs/release.mts +149 -0
- package/src/unblock-prs/release.test.mts +209 -0
- package/src/unblock-prs/set-aside-comment.mts +143 -0
- package/src/unblock-prs/set-aside-comment.test.mts +148 -0
- package/src/unblock-prs/set-aside-detail.mts +82 -0
- package/src/unblock-prs/set-aside-detail.test.mts +131 -0
- package/src/unblock-prs/skips.mts +215 -0
- package/src/unblock-prs/skips.test.mts +280 -0
- package/src/unblock-prs/stack.mts +220 -0
- package/src/unblock-prs/stack.test.mts +449 -0
- package/src/unblock-prs/triage.mts +669 -0
- package/src/unblock-prs/triage.test.mts +100 -0
- package/src/unblock-prs/types.mts +358 -0
- package/src/unblock-prs/util.mts +78 -0
- package/src/unblock-prs/util.test.mts +26 -0
- package/src/unblock-prs/version-pr.mts +112 -0
- package/src/unblock-prs/version-pr.test.mts +78 -0
- package/src/unblock-prs/watch.mts +219 -0
|
@@ -0,0 +1,793 @@
|
|
|
1
|
+
/** The shapes every module here passes around. */
|
|
2
|
+
import type { Claim, QueueContext, QueueOwner, RulesetRequirements, SetAsideComment, SetAsideReason, ChecksSummary as SharedChecksSummary } from 'pr-report-core';
|
|
3
|
+
import * as t from 'ts-fortress';
|
|
4
|
+
import type { StrictPick } from 'ts-type-forge';
|
|
5
|
+
/** The fields read of each pull request (`github.mts`'s `listPullRequests`). */
|
|
6
|
+
export declare const PullRequestSchema: Readonly<{
|
|
7
|
+
typeName: string;
|
|
8
|
+
defaultValue: Readonly<{
|
|
9
|
+
autoMergeRequest: unknown;
|
|
10
|
+
baseRefName: string;
|
|
11
|
+
body: string;
|
|
12
|
+
headRefName: string;
|
|
13
|
+
headRefOid: string;
|
|
14
|
+
id: string;
|
|
15
|
+
isCrossRepository: boolean;
|
|
16
|
+
isDraft: boolean;
|
|
17
|
+
labels: readonly Readonly<{
|
|
18
|
+
name: string;
|
|
19
|
+
}>[];
|
|
20
|
+
mergeStateStatus: string;
|
|
21
|
+
number: number;
|
|
22
|
+
state: string;
|
|
23
|
+
title: string;
|
|
24
|
+
}>;
|
|
25
|
+
is: (a: unknown) => a is Readonly<{
|
|
26
|
+
autoMergeRequest: unknown;
|
|
27
|
+
baseRefName: string;
|
|
28
|
+
body: string;
|
|
29
|
+
headRefName: string;
|
|
30
|
+
headRefOid: string;
|
|
31
|
+
id: string;
|
|
32
|
+
isCrossRepository: boolean;
|
|
33
|
+
isDraft: boolean;
|
|
34
|
+
labels: readonly Readonly<{
|
|
35
|
+
name: string;
|
|
36
|
+
}>[];
|
|
37
|
+
mergeStateStatus: string;
|
|
38
|
+
number: number;
|
|
39
|
+
state: string;
|
|
40
|
+
title: string;
|
|
41
|
+
}>;
|
|
42
|
+
assertIs: (a: unknown) => asserts a is Readonly<{
|
|
43
|
+
autoMergeRequest: unknown;
|
|
44
|
+
baseRefName: string;
|
|
45
|
+
body: string;
|
|
46
|
+
headRefName: string;
|
|
47
|
+
headRefOid: string;
|
|
48
|
+
id: string;
|
|
49
|
+
isCrossRepository: boolean;
|
|
50
|
+
isDraft: boolean;
|
|
51
|
+
labels: readonly Readonly<{
|
|
52
|
+
name: string;
|
|
53
|
+
}>[];
|
|
54
|
+
mergeStateStatus: string;
|
|
55
|
+
number: number;
|
|
56
|
+
state: string;
|
|
57
|
+
title: string;
|
|
58
|
+
}>;
|
|
59
|
+
cast: (a: unknown) => Readonly<{
|
|
60
|
+
autoMergeRequest: unknown;
|
|
61
|
+
baseRefName: string;
|
|
62
|
+
body: string;
|
|
63
|
+
headRefName: string;
|
|
64
|
+
headRefOid: string;
|
|
65
|
+
id: string;
|
|
66
|
+
isCrossRepository: boolean;
|
|
67
|
+
isDraft: boolean;
|
|
68
|
+
labels: readonly Readonly<{
|
|
69
|
+
name: string;
|
|
70
|
+
}>[];
|
|
71
|
+
mergeStateStatus: string;
|
|
72
|
+
number: number;
|
|
73
|
+
state: string;
|
|
74
|
+
title: string;
|
|
75
|
+
}>;
|
|
76
|
+
fill: (a: unknown) => Readonly<{
|
|
77
|
+
autoMergeRequest: unknown;
|
|
78
|
+
baseRefName: string;
|
|
79
|
+
body: string;
|
|
80
|
+
headRefName: string;
|
|
81
|
+
headRefOid: string;
|
|
82
|
+
id: string;
|
|
83
|
+
isCrossRepository: boolean;
|
|
84
|
+
isDraft: boolean;
|
|
85
|
+
labels: readonly Readonly<{
|
|
86
|
+
name: string;
|
|
87
|
+
}>[];
|
|
88
|
+
mergeStateStatus: string;
|
|
89
|
+
number: number;
|
|
90
|
+
state: string;
|
|
91
|
+
title: string;
|
|
92
|
+
}>;
|
|
93
|
+
prune: <B extends Readonly<{
|
|
94
|
+
autoMergeRequest: unknown;
|
|
95
|
+
baseRefName: string;
|
|
96
|
+
body: string;
|
|
97
|
+
headRefName: string;
|
|
98
|
+
headRefOid: string;
|
|
99
|
+
id: string;
|
|
100
|
+
isCrossRepository: boolean;
|
|
101
|
+
isDraft: boolean;
|
|
102
|
+
labels: readonly Readonly<{
|
|
103
|
+
name: string;
|
|
104
|
+
}>[];
|
|
105
|
+
mergeStateStatus: string;
|
|
106
|
+
number: number;
|
|
107
|
+
state: string;
|
|
108
|
+
title: string;
|
|
109
|
+
}>>(a: B) => Readonly<{
|
|
110
|
+
autoMergeRequest: unknown;
|
|
111
|
+
baseRefName: string;
|
|
112
|
+
body: string;
|
|
113
|
+
headRefName: string;
|
|
114
|
+
headRefOid: string;
|
|
115
|
+
id: string;
|
|
116
|
+
isCrossRepository: boolean;
|
|
117
|
+
isDraft: boolean;
|
|
118
|
+
labels: readonly Readonly<{
|
|
119
|
+
name: string;
|
|
120
|
+
}>[];
|
|
121
|
+
mergeStateStatus: string;
|
|
122
|
+
number: number;
|
|
123
|
+
state: string;
|
|
124
|
+
title: string;
|
|
125
|
+
}>;
|
|
126
|
+
validate: (a: unknown) => t.Result<Readonly<{
|
|
127
|
+
autoMergeRequest: unknown;
|
|
128
|
+
baseRefName: string;
|
|
129
|
+
body: string;
|
|
130
|
+
headRefName: string;
|
|
131
|
+
headRefOid: string;
|
|
132
|
+
id: string;
|
|
133
|
+
isCrossRepository: boolean;
|
|
134
|
+
isDraft: boolean;
|
|
135
|
+
labels: readonly Readonly<{
|
|
136
|
+
name: string;
|
|
137
|
+
}>[];
|
|
138
|
+
mergeStateStatus: string;
|
|
139
|
+
number: number;
|
|
140
|
+
state: string;
|
|
141
|
+
title: string;
|
|
142
|
+
}>, readonly Readonly<{
|
|
143
|
+
path: readonly string[];
|
|
144
|
+
actualValue: unknown;
|
|
145
|
+
expectedType: string;
|
|
146
|
+
typeName: string;
|
|
147
|
+
details?: t.ValidationErrorDetails | undefined;
|
|
148
|
+
}>[]>;
|
|
149
|
+
structure?: t.TypeStructure;
|
|
150
|
+
annotations?: t.TypeAnnotations;
|
|
151
|
+
optional?: true;
|
|
152
|
+
}> & Readonly<{
|
|
153
|
+
shape: {
|
|
154
|
+
readonly number: t.ConstrainedType<number, Readonly<{
|
|
155
|
+
readonly finite: undefined;
|
|
156
|
+
readonly int: undefined;
|
|
157
|
+
readonly safeInteger: undefined;
|
|
158
|
+
readonly nonZero: undefined;
|
|
159
|
+
readonly negative: undefined;
|
|
160
|
+
readonly nonNegative: undefined;
|
|
161
|
+
readonly positive: undefined;
|
|
162
|
+
readonly nonPositive: undefined;
|
|
163
|
+
readonly gt: undefined;
|
|
164
|
+
readonly gte: undefined;
|
|
165
|
+
readonly min: undefined;
|
|
166
|
+
readonly lt: undefined;
|
|
167
|
+
readonly lte: undefined;
|
|
168
|
+
readonly max: undefined;
|
|
169
|
+
readonly multipleOf: undefined;
|
|
170
|
+
readonly step: undefined;
|
|
171
|
+
}>>;
|
|
172
|
+
/** The node id, which the GraphQL mutation that arms auto-merge takes. */
|
|
173
|
+
readonly id: t.ConstrainedType<string, Readonly<{
|
|
174
|
+
readonly nonempty: undefined;
|
|
175
|
+
readonly minLength: undefined;
|
|
176
|
+
readonly maxLength: undefined;
|
|
177
|
+
readonly startsWith: undefined;
|
|
178
|
+
readonly endsWith: undefined;
|
|
179
|
+
readonly includes: undefined;
|
|
180
|
+
readonly uppercase: undefined;
|
|
181
|
+
readonly lowercase: undefined;
|
|
182
|
+
readonly regex: undefined;
|
|
183
|
+
}>>;
|
|
184
|
+
readonly title: t.ConstrainedType<string, Readonly<{
|
|
185
|
+
readonly nonempty: undefined;
|
|
186
|
+
readonly minLength: undefined;
|
|
187
|
+
readonly maxLength: undefined;
|
|
188
|
+
readonly startsWith: undefined;
|
|
189
|
+
readonly endsWith: undefined;
|
|
190
|
+
readonly includes: undefined;
|
|
191
|
+
readonly uppercase: undefined;
|
|
192
|
+
readonly lowercase: undefined;
|
|
193
|
+
readonly regex: undefined;
|
|
194
|
+
}>>;
|
|
195
|
+
/** Where a `Merge-After:` declaration is read from. */
|
|
196
|
+
readonly body: t.ConstrainedType<string, Readonly<{
|
|
197
|
+
readonly nonempty: undefined;
|
|
198
|
+
readonly minLength: undefined;
|
|
199
|
+
readonly maxLength: undefined;
|
|
200
|
+
readonly startsWith: undefined;
|
|
201
|
+
readonly endsWith: undefined;
|
|
202
|
+
readonly includes: undefined;
|
|
203
|
+
readonly uppercase: undefined;
|
|
204
|
+
readonly lowercase: undefined;
|
|
205
|
+
readonly regex: undefined;
|
|
206
|
+
}>>;
|
|
207
|
+
readonly state: t.ConstrainedType<string, Readonly<{
|
|
208
|
+
readonly nonempty: undefined;
|
|
209
|
+
readonly minLength: undefined;
|
|
210
|
+
readonly maxLength: undefined;
|
|
211
|
+
readonly startsWith: undefined;
|
|
212
|
+
readonly endsWith: undefined;
|
|
213
|
+
readonly includes: undefined;
|
|
214
|
+
readonly uppercase: undefined;
|
|
215
|
+
readonly lowercase: undefined;
|
|
216
|
+
readonly regex: undefined;
|
|
217
|
+
}>>;
|
|
218
|
+
readonly headRefName: t.ConstrainedType<string, Readonly<{
|
|
219
|
+
readonly nonempty: undefined;
|
|
220
|
+
readonly minLength: undefined;
|
|
221
|
+
readonly maxLength: undefined;
|
|
222
|
+
readonly startsWith: undefined;
|
|
223
|
+
readonly endsWith: undefined;
|
|
224
|
+
readonly includes: undefined;
|
|
225
|
+
readonly uppercase: undefined;
|
|
226
|
+
readonly lowercase: undefined;
|
|
227
|
+
readonly regex: undefined;
|
|
228
|
+
}>>;
|
|
229
|
+
readonly headRefOid: t.ConstrainedType<string, Readonly<{
|
|
230
|
+
readonly nonempty: undefined;
|
|
231
|
+
readonly minLength: undefined;
|
|
232
|
+
readonly maxLength: undefined;
|
|
233
|
+
readonly startsWith: undefined;
|
|
234
|
+
readonly endsWith: undefined;
|
|
235
|
+
readonly includes: undefined;
|
|
236
|
+
readonly uppercase: undefined;
|
|
237
|
+
readonly lowercase: undefined;
|
|
238
|
+
readonly regex: undefined;
|
|
239
|
+
}>>;
|
|
240
|
+
readonly baseRefName: t.ConstrainedType<string, Readonly<{
|
|
241
|
+
readonly nonempty: undefined;
|
|
242
|
+
readonly minLength: undefined;
|
|
243
|
+
readonly maxLength: undefined;
|
|
244
|
+
readonly startsWith: undefined;
|
|
245
|
+
readonly endsWith: undefined;
|
|
246
|
+
readonly includes: undefined;
|
|
247
|
+
readonly uppercase: undefined;
|
|
248
|
+
readonly lowercase: undefined;
|
|
249
|
+
readonly regex: undefined;
|
|
250
|
+
}>>;
|
|
251
|
+
/**
|
|
252
|
+
* Whether the head branch lives in a fork. A fork's branch is never the
|
|
253
|
+
* parent of a stack, and never pushed to when one is restacked.
|
|
254
|
+
*/
|
|
255
|
+
readonly isCrossRepository: Readonly<{
|
|
256
|
+
typeName: string;
|
|
257
|
+
defaultValue: boolean;
|
|
258
|
+
is: (a: unknown) => a is boolean;
|
|
259
|
+
assertIs: (a: unknown) => asserts a is boolean;
|
|
260
|
+
cast: (a: unknown) => boolean;
|
|
261
|
+
fill: (a: unknown) => boolean;
|
|
262
|
+
prune: <B extends boolean>(a: B) => boolean;
|
|
263
|
+
validate: (a: unknown) => t.Result<boolean, readonly Readonly<{
|
|
264
|
+
path: readonly string[];
|
|
265
|
+
actualValue: unknown;
|
|
266
|
+
expectedType: string;
|
|
267
|
+
typeName: string;
|
|
268
|
+
details?: t.ValidationErrorDetails | undefined;
|
|
269
|
+
}>[]>;
|
|
270
|
+
structure?: t.TypeStructure;
|
|
271
|
+
annotations?: t.TypeAnnotations;
|
|
272
|
+
optional?: true;
|
|
273
|
+
}>;
|
|
274
|
+
readonly isDraft: Readonly<{
|
|
275
|
+
typeName: string;
|
|
276
|
+
defaultValue: boolean;
|
|
277
|
+
is: (a: unknown) => a is boolean;
|
|
278
|
+
assertIs: (a: unknown) => asserts a is boolean;
|
|
279
|
+
cast: (a: unknown) => boolean;
|
|
280
|
+
fill: (a: unknown) => boolean;
|
|
281
|
+
prune: <B extends boolean>(a: B) => boolean;
|
|
282
|
+
validate: (a: unknown) => t.Result<boolean, readonly Readonly<{
|
|
283
|
+
path: readonly string[];
|
|
284
|
+
actualValue: unknown;
|
|
285
|
+
expectedType: string;
|
|
286
|
+
typeName: string;
|
|
287
|
+
details?: t.ValidationErrorDetails | undefined;
|
|
288
|
+
}>[]>;
|
|
289
|
+
structure?: t.TypeStructure;
|
|
290
|
+
annotations?: t.TypeAnnotations;
|
|
291
|
+
optional?: true;
|
|
292
|
+
}>;
|
|
293
|
+
readonly mergeStateStatus: t.ConstrainedType<string, Readonly<{
|
|
294
|
+
readonly nonempty: undefined;
|
|
295
|
+
readonly minLength: undefined;
|
|
296
|
+
readonly maxLength: undefined;
|
|
297
|
+
readonly startsWith: undefined;
|
|
298
|
+
readonly endsWith: undefined;
|
|
299
|
+
readonly includes: undefined;
|
|
300
|
+
readonly uppercase: undefined;
|
|
301
|
+
readonly lowercase: undefined;
|
|
302
|
+
readonly regex: undefined;
|
|
303
|
+
}>>;
|
|
304
|
+
readonly autoMergeRequest: Readonly<{
|
|
305
|
+
typeName: string;
|
|
306
|
+
defaultValue: unknown;
|
|
307
|
+
is: (a: unknown) => a is unknown;
|
|
308
|
+
assertIs: (a: unknown) => asserts a is unknown;
|
|
309
|
+
cast: (a: unknown) => unknown;
|
|
310
|
+
fill: (a: unknown) => unknown;
|
|
311
|
+
prune: <B extends unknown>(a: B) => unknown;
|
|
312
|
+
validate: (a: unknown) => t.Result<unknown, readonly Readonly<{
|
|
313
|
+
path: readonly string[];
|
|
314
|
+
actualValue: unknown;
|
|
315
|
+
expectedType: string;
|
|
316
|
+
typeName: string;
|
|
317
|
+
details?: t.ValidationErrorDetails | undefined;
|
|
318
|
+
}>[]>;
|
|
319
|
+
structure?: t.TypeStructure;
|
|
320
|
+
annotations?: t.TypeAnnotations;
|
|
321
|
+
optional?: true;
|
|
322
|
+
}>;
|
|
323
|
+
readonly labels: Readonly<{
|
|
324
|
+
typeName: string;
|
|
325
|
+
defaultValue: readonly Readonly<{
|
|
326
|
+
name: string;
|
|
327
|
+
}>[];
|
|
328
|
+
is: (a: unknown) => a is readonly Readonly<{
|
|
329
|
+
name: string;
|
|
330
|
+
}>[];
|
|
331
|
+
assertIs: (a: unknown) => asserts a is readonly Readonly<{
|
|
332
|
+
name: string;
|
|
333
|
+
}>[];
|
|
334
|
+
cast: (a: unknown) => readonly Readonly<{
|
|
335
|
+
name: string;
|
|
336
|
+
}>[];
|
|
337
|
+
fill: (a: unknown) => readonly Readonly<{
|
|
338
|
+
name: string;
|
|
339
|
+
}>[];
|
|
340
|
+
prune: <B extends readonly Readonly<{
|
|
341
|
+
name: string;
|
|
342
|
+
}>[]>(a: B) => readonly Readonly<{
|
|
343
|
+
name: string;
|
|
344
|
+
}>[];
|
|
345
|
+
validate: (a: unknown) => t.Result<readonly Readonly<{
|
|
346
|
+
name: string;
|
|
347
|
+
}>[], readonly Readonly<{
|
|
348
|
+
path: readonly string[];
|
|
349
|
+
actualValue: unknown;
|
|
350
|
+
expectedType: string;
|
|
351
|
+
typeName: string;
|
|
352
|
+
details?: t.ValidationErrorDetails | undefined;
|
|
353
|
+
}>[]>;
|
|
354
|
+
structure?: t.TypeStructure;
|
|
355
|
+
annotations?: t.TypeAnnotations;
|
|
356
|
+
optional?: true;
|
|
357
|
+
}>;
|
|
358
|
+
};
|
|
359
|
+
}>;
|
|
360
|
+
export type PullRequest = t.TypeOf<typeof PullRequestSchema>;
|
|
361
|
+
export declare const PullRequestListSchema: Readonly<{
|
|
362
|
+
typeName: string;
|
|
363
|
+
defaultValue: readonly Readonly<{
|
|
364
|
+
autoMergeRequest: unknown;
|
|
365
|
+
baseRefName: string;
|
|
366
|
+
body: string;
|
|
367
|
+
headRefName: string;
|
|
368
|
+
headRefOid: string;
|
|
369
|
+
id: string;
|
|
370
|
+
isCrossRepository: boolean;
|
|
371
|
+
isDraft: boolean;
|
|
372
|
+
labels: readonly Readonly<{
|
|
373
|
+
name: string;
|
|
374
|
+
}>[];
|
|
375
|
+
mergeStateStatus: string;
|
|
376
|
+
number: number;
|
|
377
|
+
state: string;
|
|
378
|
+
title: string;
|
|
379
|
+
}>[];
|
|
380
|
+
is: (a: unknown) => a is readonly Readonly<{
|
|
381
|
+
autoMergeRequest: unknown;
|
|
382
|
+
baseRefName: string;
|
|
383
|
+
body: string;
|
|
384
|
+
headRefName: string;
|
|
385
|
+
headRefOid: string;
|
|
386
|
+
id: string;
|
|
387
|
+
isCrossRepository: boolean;
|
|
388
|
+
isDraft: boolean;
|
|
389
|
+
labels: readonly Readonly<{
|
|
390
|
+
name: string;
|
|
391
|
+
}>[];
|
|
392
|
+
mergeStateStatus: string;
|
|
393
|
+
number: number;
|
|
394
|
+
state: string;
|
|
395
|
+
title: string;
|
|
396
|
+
}>[];
|
|
397
|
+
assertIs: (a: unknown) => asserts a is readonly Readonly<{
|
|
398
|
+
autoMergeRequest: unknown;
|
|
399
|
+
baseRefName: string;
|
|
400
|
+
body: string;
|
|
401
|
+
headRefName: string;
|
|
402
|
+
headRefOid: string;
|
|
403
|
+
id: string;
|
|
404
|
+
isCrossRepository: boolean;
|
|
405
|
+
isDraft: boolean;
|
|
406
|
+
labels: readonly Readonly<{
|
|
407
|
+
name: string;
|
|
408
|
+
}>[];
|
|
409
|
+
mergeStateStatus: string;
|
|
410
|
+
number: number;
|
|
411
|
+
state: string;
|
|
412
|
+
title: string;
|
|
413
|
+
}>[];
|
|
414
|
+
cast: (a: unknown) => readonly Readonly<{
|
|
415
|
+
autoMergeRequest: unknown;
|
|
416
|
+
baseRefName: string;
|
|
417
|
+
body: string;
|
|
418
|
+
headRefName: string;
|
|
419
|
+
headRefOid: string;
|
|
420
|
+
id: string;
|
|
421
|
+
isCrossRepository: boolean;
|
|
422
|
+
isDraft: boolean;
|
|
423
|
+
labels: readonly Readonly<{
|
|
424
|
+
name: string;
|
|
425
|
+
}>[];
|
|
426
|
+
mergeStateStatus: string;
|
|
427
|
+
number: number;
|
|
428
|
+
state: string;
|
|
429
|
+
title: string;
|
|
430
|
+
}>[];
|
|
431
|
+
fill: (a: unknown) => readonly Readonly<{
|
|
432
|
+
autoMergeRequest: unknown;
|
|
433
|
+
baseRefName: string;
|
|
434
|
+
body: string;
|
|
435
|
+
headRefName: string;
|
|
436
|
+
headRefOid: string;
|
|
437
|
+
id: string;
|
|
438
|
+
isCrossRepository: boolean;
|
|
439
|
+
isDraft: boolean;
|
|
440
|
+
labels: readonly Readonly<{
|
|
441
|
+
name: string;
|
|
442
|
+
}>[];
|
|
443
|
+
mergeStateStatus: string;
|
|
444
|
+
number: number;
|
|
445
|
+
state: string;
|
|
446
|
+
title: string;
|
|
447
|
+
}>[];
|
|
448
|
+
prune: <B extends readonly Readonly<{
|
|
449
|
+
autoMergeRequest: unknown;
|
|
450
|
+
baseRefName: string;
|
|
451
|
+
body: string;
|
|
452
|
+
headRefName: string;
|
|
453
|
+
headRefOid: string;
|
|
454
|
+
id: string;
|
|
455
|
+
isCrossRepository: boolean;
|
|
456
|
+
isDraft: boolean;
|
|
457
|
+
labels: readonly Readonly<{
|
|
458
|
+
name: string;
|
|
459
|
+
}>[];
|
|
460
|
+
mergeStateStatus: string;
|
|
461
|
+
number: number;
|
|
462
|
+
state: string;
|
|
463
|
+
title: string;
|
|
464
|
+
}>[]>(a: B) => readonly Readonly<{
|
|
465
|
+
autoMergeRequest: unknown;
|
|
466
|
+
baseRefName: string;
|
|
467
|
+
body: string;
|
|
468
|
+
headRefName: string;
|
|
469
|
+
headRefOid: string;
|
|
470
|
+
id: string;
|
|
471
|
+
isCrossRepository: boolean;
|
|
472
|
+
isDraft: boolean;
|
|
473
|
+
labels: readonly Readonly<{
|
|
474
|
+
name: string;
|
|
475
|
+
}>[];
|
|
476
|
+
mergeStateStatus: string;
|
|
477
|
+
number: number;
|
|
478
|
+
state: string;
|
|
479
|
+
title: string;
|
|
480
|
+
}>[];
|
|
481
|
+
validate: (a: unknown) => t.Result<readonly Readonly<{
|
|
482
|
+
autoMergeRequest: unknown;
|
|
483
|
+
baseRefName: string;
|
|
484
|
+
body: string;
|
|
485
|
+
headRefName: string;
|
|
486
|
+
headRefOid: string;
|
|
487
|
+
id: string;
|
|
488
|
+
isCrossRepository: boolean;
|
|
489
|
+
isDraft: boolean;
|
|
490
|
+
labels: readonly Readonly<{
|
|
491
|
+
name: string;
|
|
492
|
+
}>[];
|
|
493
|
+
mergeStateStatus: string;
|
|
494
|
+
number: number;
|
|
495
|
+
state: string;
|
|
496
|
+
title: string;
|
|
497
|
+
}>[], readonly Readonly<{
|
|
498
|
+
path: readonly string[];
|
|
499
|
+
actualValue: unknown;
|
|
500
|
+
expectedType: string;
|
|
501
|
+
typeName: string;
|
|
502
|
+
details?: t.ValidationErrorDetails | undefined;
|
|
503
|
+
}>[]>;
|
|
504
|
+
structure?: t.TypeStructure;
|
|
505
|
+
annotations?: t.TypeAnnotations;
|
|
506
|
+
optional?: true;
|
|
507
|
+
}>;
|
|
508
|
+
/**
|
|
509
|
+
* What moving a branch reads of its pull request, which `push-fixed-pr` fills
|
|
510
|
+
* in from the REST API rather than from GraphQL.
|
|
511
|
+
*/
|
|
512
|
+
export type BranchOf = StrictPick<PullRequest, 'baseRefName' | 'headRefName' | 'headRefOid' | 'isCrossRepository' | 'number' | 'state'>;
|
|
513
|
+
/**
|
|
514
|
+
* Why a pull request was set aside: `pr-report-core`'s list, where each
|
|
515
|
+
* reason is given its owner (`queue-owner.mts`), so that a reason this
|
|
516
|
+
* script writes is one every reader knows.
|
|
517
|
+
*/
|
|
518
|
+
export type SkipReason = SetAsideReason;
|
|
519
|
+
/**
|
|
520
|
+
* Why a pull request is being left alone, and the state it was in at the
|
|
521
|
+
* time. A record stops applying as soon as that state changes: a push to the
|
|
522
|
+
* branch clears every reason, and every reason but `checks-failed` and
|
|
523
|
+
* `awaiting-bypass` also clears when the base moves. `awaiting-bypass` is the
|
|
524
|
+
* one that is not a failure: every required check is green on a pull request
|
|
525
|
+
* nothing but a ruleset bypass will merge, and what is left is a person's
|
|
526
|
+
* (`pr-report-core`'s `review-hold.mts`). See `skipStillApplies`.
|
|
527
|
+
*/
|
|
528
|
+
export type SkipRecord = Readonly<{
|
|
529
|
+
number: number;
|
|
530
|
+
headSha: string;
|
|
531
|
+
baseSha: string;
|
|
532
|
+
reason: SkipReason;
|
|
533
|
+
/** One sentence, which the log says and the comment leads with. */
|
|
534
|
+
detail: string;
|
|
535
|
+
/** For `checks-failed`: each failed required check, with its run. */
|
|
536
|
+
failedChecks?: ChecksSummary['failedRuns'];
|
|
537
|
+
/** What the command that failed printed, which the comment folds away. */
|
|
538
|
+
output?: string;
|
|
539
|
+
}>;
|
|
540
|
+
export type SkipRecords = ReadonlyMap<number, SkipRecord>;
|
|
541
|
+
/**
|
|
542
|
+
* One of this account's set-aside comments on a pull request, and what it
|
|
543
|
+
* says. `pr-report-core`'s `set-aside.mts` says what it is.
|
|
544
|
+
*/
|
|
545
|
+
export type OwnSetAsideComment = Readonly<{
|
|
546
|
+
/** The REST id, which editing it takes. */
|
|
547
|
+
databaseId: number;
|
|
548
|
+
says: SetAsideComment;
|
|
549
|
+
}>;
|
|
550
|
+
/**
|
|
551
|
+
* Pull request number → the head it was demoted at: the pull requests picked
|
|
552
|
+
* last, after a watch saw them green and still open. See `demotions.mts`.
|
|
553
|
+
*/
|
|
554
|
+
export type Demotions = ReadonlyMap<number, string>;
|
|
555
|
+
/**
|
|
556
|
+
* What the ruleset asks of a review, read by `pr-report-core`'s
|
|
557
|
+
* `review-hold.mts`.
|
|
558
|
+
*/
|
|
559
|
+
export type ReviewRequirements = StrictPick<RulesetRequirements, 'requireCodeOwnerReview' | 'requireConversationResolution'>;
|
|
560
|
+
export type Survey = Readonly<{
|
|
561
|
+
pullRequests: readonly PullRequest[];
|
|
562
|
+
/** The tip of the default branch at the time of the survey. */
|
|
563
|
+
baseSha: string;
|
|
564
|
+
/** The contexts the ruleset requires, empty when they cannot be read. */
|
|
565
|
+
requiredContexts: readonly string[];
|
|
566
|
+
/** Nothing is required when the rules cannot be read. */
|
|
567
|
+
reviewRequirements: ReviewRequirements;
|
|
568
|
+
}>;
|
|
569
|
+
/**
|
|
570
|
+
* `pr-report-core`'s verdict over the required contexts — the one `pr-report`
|
|
571
|
+
* and the page reach too — with what the worker reads besides.
|
|
572
|
+
*/
|
|
573
|
+
export type ChecksSummary = SharedChecksSummary & Readonly<{
|
|
574
|
+
/**
|
|
575
|
+
* {@link SharedChecksSummary.failed}, each with its run's link, which a
|
|
576
|
+
* set-aside comment points at.
|
|
577
|
+
*/
|
|
578
|
+
failedRuns: readonly Readonly<{
|
|
579
|
+
name: string;
|
|
580
|
+
link: string;
|
|
581
|
+
}>[];
|
|
582
|
+
/**
|
|
583
|
+
* Checks on the head that have not finished and are not among `pending`,
|
|
584
|
+
* mostly the jobs a required aggregate is still waiting on.
|
|
585
|
+
*/
|
|
586
|
+
running: readonly string[];
|
|
587
|
+
}>;
|
|
588
|
+
/** What a survey knows before the declared merge order has been read. */
|
|
589
|
+
export type TriageBase = Readonly<{
|
|
590
|
+
defaultBranch: string;
|
|
591
|
+
baseSha: string;
|
|
592
|
+
skipped: SkipRecords;
|
|
593
|
+
/** The claims that still hold their pull requests (`claims.mts`). */
|
|
594
|
+
claimed: ReadonlyMap<number, Claim>;
|
|
595
|
+
demoted: Demotions;
|
|
596
|
+
requiredContexts: readonly string[];
|
|
597
|
+
reviewRequirements: ReviewRequirements;
|
|
598
|
+
/** What the issues the pull requests close add to the merge order. */
|
|
599
|
+
issueOrder: IssueOrder;
|
|
600
|
+
}>;
|
|
601
|
+
/**
|
|
602
|
+
* Which open issues each open pull request closes, and each such issue's
|
|
603
|
+
* `Start-After:`, which the pull request closing it inherits as a merge
|
|
604
|
+
* order (`docs/issue-start-after.md`).
|
|
605
|
+
*/
|
|
606
|
+
export type IssueOrder = Readonly<{
|
|
607
|
+
closes: ReadonlyMap<number, readonly number[]>;
|
|
608
|
+
startAfter: ReadonlyMap<number, readonly number[]>;
|
|
609
|
+
}>;
|
|
610
|
+
/**
|
|
611
|
+
* What triage decides each pull request against: the survey, and what the
|
|
612
|
+
* open pull requests say about one another (`pr-report-core`'s
|
|
613
|
+
* `queue-order.mts`).
|
|
614
|
+
*/
|
|
615
|
+
export type TriageContext = TriageBase & QueueContext;
|
|
616
|
+
/** What one survey says about one pull request. */
|
|
617
|
+
export type Classification = Readonly<{
|
|
618
|
+
kind: 'candidate';
|
|
619
|
+
} | {
|
|
620
|
+
kind: 'failing';
|
|
621
|
+
summary: ChecksSummary;
|
|
622
|
+
} | {
|
|
623
|
+
kind: 'held';
|
|
624
|
+
reason: string;
|
|
625
|
+
} | {
|
|
626
|
+
kind: 'ignore';
|
|
627
|
+
} | {
|
|
628
|
+
kind: 'in-flight';
|
|
629
|
+
} | {
|
|
630
|
+
kind: 'note';
|
|
631
|
+
note: string;
|
|
632
|
+
}>;
|
|
633
|
+
export type Failing = Readonly<{
|
|
634
|
+
pr: PullRequest;
|
|
635
|
+
summary: ChecksSummary;
|
|
636
|
+
}>;
|
|
637
|
+
export type Triage = Readonly<{
|
|
638
|
+
/** How many of the surveyed pull requests this script has anything to say about. */
|
|
639
|
+
inScope: number;
|
|
640
|
+
/**
|
|
641
|
+
* The queued pull requests this cycle may act on — behind the base, or
|
|
642
|
+
* paused by `skip-ci`, or both — with nothing they declared `Merge-After`
|
|
643
|
+
* on still open, and on the default branch rather than stacked. Lowest
|
|
644
|
+
* number first.
|
|
645
|
+
*/
|
|
646
|
+
candidates: readonly PullRequest[];
|
|
647
|
+
/**
|
|
648
|
+
* The candidates and the pull requests in flight that have no auto-merge
|
|
649
|
+
* yet, which this script arms when it picks them. See `armOnPick` in
|
|
650
|
+
* `rebase.mts`.
|
|
651
|
+
*/
|
|
652
|
+
toArm: ReadonlySet<number>;
|
|
653
|
+
/** Which open pull request each stacked one is on: child → parent. */
|
|
654
|
+
stackParents: ReadonlyMap<number, number>;
|
|
655
|
+
/**
|
|
656
|
+
* The candidates and the pull requests in flight that only a ruleset bypass
|
|
657
|
+
* will merge, with why (`pr-report-core`'s `review-hold.mts`): their checks
|
|
658
|
+
* are run all the same, and they are never armed.
|
|
659
|
+
*/
|
|
660
|
+
bypass: ReadonlyMap<number, string>;
|
|
661
|
+
/** Up to date with checks still running, or clean and about to merge. */
|
|
662
|
+
inFlight: readonly PullRequest[];
|
|
663
|
+
/** Up to date, but a required check has failed. */
|
|
664
|
+
failing: readonly Failing[];
|
|
665
|
+
/**
|
|
666
|
+
* Queued pull requests that would have been picked or watched but for
|
|
667
|
+
* their review — an owner's approval or a conversation still open — each
|
|
668
|
+
* as a note like the ones below.
|
|
669
|
+
*/
|
|
670
|
+
held: readonly string[];
|
|
671
|
+
/** Everything else, with the reason it was set aside. */
|
|
672
|
+
notes: readonly string[];
|
|
673
|
+
/** The `Merge-After` cycles, each starting at its lowest number. */
|
|
674
|
+
cycles: readonly (readonly number[])[];
|
|
675
|
+
/**
|
|
676
|
+
* Who moves each queued pull request next (`owner.mts`), the same answer
|
|
677
|
+
* `pr-report` gives the skill. "3a" moves only the worker's.
|
|
678
|
+
*/
|
|
679
|
+
owners: ReadonlyMap<number, QueueOwner>;
|
|
680
|
+
}>;
|
|
681
|
+
/**
|
|
682
|
+
* One change of a pull request's base, from its timeline. `stack.mts` reads
|
|
683
|
+
* the last of them to tell which branch GitHub moved a layer off.
|
|
684
|
+
*/
|
|
685
|
+
export type BaseChange = Readonly<{
|
|
686
|
+
from: string;
|
|
687
|
+
to: string;
|
|
688
|
+
}>;
|
|
689
|
+
export type WatchOutcome = 'auto-merge-disabled' | 'awaiting-bypass' | 'behind-again' | 'checks-failed' | 'closed' | 'error' | 'head-moved' | 'merged' | 'not-merging' | 'stopped' | 'timeout' | 'skip-ci-labelled';
|
|
690
|
+
/**
|
|
691
|
+
* How a watch ended, and for an outcome that sets the pull request aside,
|
|
692
|
+
* what its comment says: `detail` and, when checks failed, which.
|
|
693
|
+
*/
|
|
694
|
+
export type Watched = Readonly<{
|
|
695
|
+
outcome: WatchOutcome;
|
|
696
|
+
detail?: string;
|
|
697
|
+
failedChecks?: ChecksSummary['failedRuns'];
|
|
698
|
+
}>;
|
|
699
|
+
/**
|
|
700
|
+
* Pull request number → the branch it was last seen stacked on: every layer
|
|
701
|
+
* of a stack, and one whose parent has left the open list while GitHub has
|
|
702
|
+
* yet to move it off that parent's branch. A layer that leaves this map by
|
|
703
|
+
* landing on the default branch is one `stack.mts` may have to rebase off
|
|
704
|
+
* the layer that merged below it.
|
|
705
|
+
*/
|
|
706
|
+
export type StackedOn = ReadonlyMap<number, string>;
|
|
707
|
+
/**
|
|
708
|
+
* A pull request on the default branch that may have been moved there when
|
|
709
|
+
* the layer below it merged: `from` is that layer's branch, or `undefined`
|
|
710
|
+
* when it has to be read from the pull request's timeline.
|
|
711
|
+
*/
|
|
712
|
+
export type RetargetedLayer = Readonly<{
|
|
713
|
+
pr: PullRequest;
|
|
714
|
+
from: string | undefined;
|
|
715
|
+
}>;
|
|
716
|
+
/** What the loop remembers about how long the list has sat still. */
|
|
717
|
+
export type Quiet = Readonly<{
|
|
718
|
+
/** The last survey's fingerprint; none before any survey has succeeded. */
|
|
719
|
+
fingerprint: string | undefined;
|
|
720
|
+
/** How many surveys in a row have seen what the one before them saw. */
|
|
721
|
+
unchanged: number;
|
|
722
|
+
}>;
|
|
723
|
+
/**
|
|
724
|
+
* What one run carries from cycle to cycle: the pull requests it has given up
|
|
725
|
+
* on, the ones it picks last, the ones it has acted on and last saw open,
|
|
726
|
+
* where the base was when it last looked, how long the list has sat still,
|
|
727
|
+
* and which pull requests were stacked on what.
|
|
728
|
+
*/
|
|
729
|
+
export type LoopState = Readonly<{
|
|
730
|
+
skipped: SkipRecords;
|
|
731
|
+
demoted: Demotions;
|
|
732
|
+
tracked: ReadonlySet<number>;
|
|
733
|
+
baseSha: string | undefined;
|
|
734
|
+
quiet: Quiet;
|
|
735
|
+
/** `undefined` until the first survey, which has nothing to compare with. */
|
|
736
|
+
stackedOn: StackedOn | undefined;
|
|
737
|
+
}>;
|
|
738
|
+
export type CycleResult = Readonly<{
|
|
739
|
+
state: LoopState;
|
|
740
|
+
next: 'idle' | 'stop' | 'survey';
|
|
741
|
+
/**
|
|
742
|
+
* The records the cycle acted from — what it carried over, less what no
|
|
743
|
+
* longer applied, plus what the comments on the pull requests said. A
|
|
744
|
+
* record in `state` that is not among these, or differs from its entry, is
|
|
745
|
+
* one this cycle set aside, and the one its comment has to say.
|
|
746
|
+
*/
|
|
747
|
+
settled: SkipRecords;
|
|
748
|
+
}>;
|
|
749
|
+
/**
|
|
750
|
+
* How far `advance` got with one pull request. `moved` is the branch moving
|
|
751
|
+
* under it — someone else, the skill or a person, is taking that pull
|
|
752
|
+
* request forward — which is neither progress nor a failure of the pull
|
|
753
|
+
* request.
|
|
754
|
+
*/
|
|
755
|
+
export type Advanced = Readonly<{
|
|
756
|
+
kind: 'advanced';
|
|
757
|
+
head: string;
|
|
758
|
+
} | {
|
|
759
|
+
kind: 'moved';
|
|
760
|
+
} | {
|
|
761
|
+
kind: 'stale-merge-state';
|
|
762
|
+
}>;
|
|
763
|
+
/**
|
|
764
|
+
* What `autoFix` did about a failed head. `declined` covers everything that
|
|
765
|
+
* is not a fixer's diff and everything that went wrong on the way; either way
|
|
766
|
+
* the failure stands and is the skill's. `moved` is what it is for `advance`.
|
|
767
|
+
*/
|
|
768
|
+
export type AutoFixed = Readonly<{
|
|
769
|
+
kind: 'declined';
|
|
770
|
+
detail: string;
|
|
771
|
+
} | {
|
|
772
|
+
kind: 'moved';
|
|
773
|
+
} | {
|
|
774
|
+
kind: 'pushed';
|
|
775
|
+
head: string;
|
|
776
|
+
commands: readonly string[];
|
|
777
|
+
}>;
|
|
778
|
+
export type RebaseFailure = Readonly<{
|
|
779
|
+
reason: 'already-in-base' | 'arm-failed' | 'push-failed' | 'rebase-failed' | 'unlabel-failed';
|
|
780
|
+
detail: string;
|
|
781
|
+
/** What the command that failed printed, when there is more than `detail`. */
|
|
782
|
+
output?: string;
|
|
783
|
+
}>;
|
|
784
|
+
/**
|
|
785
|
+
* What `advance` is asked to do besides the rebase: arm auto-merge, and carry
|
|
786
|
+
* the layers stacked on it along.
|
|
787
|
+
*/
|
|
788
|
+
export type AdvancePlan = Readonly<{
|
|
789
|
+
arm: boolean;
|
|
790
|
+
/** Every open layer above it, each after the one it is on. */
|
|
791
|
+
descendants: readonly PullRequest[];
|
|
792
|
+
}>;
|
|
793
|
+
//# sourceMappingURL=types.d.mts.map
|