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,94 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
import { SKIP_CI_LABEL } from 'pr-report-core';
|
|
28
|
+
import { Arr, Result } from 'ts-data-forge';
|
|
29
|
+
import { log } from '../lib/index.mjs';
|
|
30
|
+
import { addSkipCiLabel, listPullRequests } from './github.mjs';
|
|
31
|
+
import { isMergeQueued, isSkipCiLabelled, priorityRank } from './labels.mjs';
|
|
32
|
+
import { isVersionPullRequest } from './version-pr.mjs';
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
export const settleAfterRelease = async (api, target, owners, pausedAtSurvey, defaultBranch) => {
|
|
41
|
+
const listed = await listPullRequests(api);
|
|
42
|
+
if (Result.isErr(listed)) {
|
|
43
|
+
log(`Cannot list pull requests to check the release: ${listed.value}`);
|
|
44
|
+
return 'kept';
|
|
45
|
+
}
|
|
46
|
+
const first = yieldsTo(target, listed.value, owners, pausedAtSurvey, defaultBranch);
|
|
47
|
+
if (first === undefined) {
|
|
48
|
+
return 'kept';
|
|
49
|
+
}
|
|
50
|
+
const added = await addSkipCiLabel(api, target.number);
|
|
51
|
+
log(Result.isErr(added)
|
|
52
|
+
? `#${target.number}: cannot put ${SKIP_CI_LABEL} back on it to let #${first.number} go first: ${added.value}`
|
|
53
|
+
: `#${target.number}: put ${SKIP_CI_LABEL} back on it; #${first.number} was released in the same moment and goes first.`);
|
|
54
|
+
return Result.isErr(added) ? 'kept' : 'yielded';
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
export const yieldsTo = (target, pullRequests, owners, pausedAtSurvey, defaultBranch) => {
|
|
66
|
+
const others = releasedExcept(pullRequests, target.number).filter((pr) => owners.get(pr.number)?.owner === 'worker' &&
|
|
67
|
+
pausedAtSurvey.has(pr.number));
|
|
68
|
+
const first = firstInReleaseOrder(Arr.toUnshifted(target)(others), defaultBranch);
|
|
69
|
+
return first === undefined || first.number === target.number
|
|
70
|
+
? undefined
|
|
71
|
+
: first;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
export const releasedExcept = (pullRequests, keep) => pullRequests.filter((pr) => pr.number !== keep &&
|
|
80
|
+
pr.state === 'OPEN' &&
|
|
81
|
+
isMergeQueued(pr) &&
|
|
82
|
+
!isSkipCiLabelled(pr));
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
export const firstInReleaseOrder = (released, defaultBranch) => {
|
|
90
|
+
const rank = (pr) => priorityRank(pr) * 2 + (isVersionPullRequest(pr, defaultBranch) ? 1 : 0);
|
|
91
|
+
const sorted = released.toSorted((a, b) => rank(a) === rank(b) ? a.number - b.number : rank(a) - rank(b));
|
|
92
|
+
return Arr.isNonEmpty(sorted) ? sorted[0] : undefined;
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=release.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release.mjs","sourceRoot":"","sources":["../../src/unblock-prs/release.mts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,aAAa,EAAmB,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAmB,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EACrC,GAAe,EACf,MAAmB,EACnB,MAAuC,EACvC,cAAmC,EACnC,aAAqB,EACQ,EAAE;IAC/B,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAE3C,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,GAAG,CAAC,mDAAmD,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAEvE,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,KAAK,GAAG,QAAQ,CACpB,MAAM,EACN,MAAM,CAAC,KAAK,EACZ,MAAM,EACN,cAAc,EACd,aAAa,CACd,CAAC;IAEF,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,KAAK,GAAG,MAAM,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAEvD,GAAG,CACD,MAAM,CAAC,KAAK,CAAC,K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,aAAa,CAAC,EAAE,CAAC;IACjB,CAAC,gBAAgB,CAAC,EAAE,CAAC,CACxB,CAAC;AAEJ;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,QAAgC,EAChC,aAAqB,EACI,EAAE;IAC3B,MAAM,IAAI,GAAG,CAAC,EAAe,EAAU,EAAE,CACvC,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAE3E,MAAM,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACxC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAC9D,CAAC;IAEF,OAAO,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACxD,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The prose of the comment a pull request gets when this script sets it
|
|
3
|
+
* aside, and of the one line it is rewritten to once that is over.
|
|
4
|
+
* `pr-report-core`'s `set-aside.mts` wraps it in the record the script and
|
|
5
|
+
* the page read back; nothing reads the prose.
|
|
6
|
+
*/
|
|
7
|
+
import { type SetAside } from 'pr-report-core';
|
|
8
|
+
import type { SkipRecord } from './types.mjs';
|
|
9
|
+
/**
|
|
10
|
+
* What a reader needs without the terminal this ran in: the reason and its
|
|
11
|
+
* sentence, each failed check with its run, what the command printed —
|
|
12
|
+
* folded, and cut to its end — and what will take it off.
|
|
13
|
+
*/
|
|
14
|
+
export declare const setAsideCommentBody: (skip: SkipRecord, defaultBranch: string) => string;
|
|
15
|
+
/** The one line a comment is rewritten to: what it was, what ended it, when. */
|
|
16
|
+
export declare const resolvedCommentBody: (setAside: SetAside, resolvedBy: ResolvedBy, defaultBranch: string, atEpochMs: number) => string;
|
|
17
|
+
export declare const describeResolvedBy: (resolvedBy: ResolvedBy, defaultBranch: string) => string;
|
|
18
|
+
/** What ended a set-aside, as the resolved line says it. */
|
|
19
|
+
export type ResolvedBy = 'base-moved' | 'pushed' | 'retry';
|
|
20
|
+
//# sourceMappingURL=set-aside-comment.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-aside-comment.d.mts","sourceRoot":"","sources":["../../src/unblock-prs/set-aside-comment.mts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAGL,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,SACxB,UAAU,iBACD,MAAM,KACpB,MAyCF,CAAC;AAUF,gFAAgF;AAChF,eAAO,MAAM,mBAAmB,aACpB,QAAQ,cACN,UAAU,iBACP,MAAM,aACV,MAAM,KAChB,MAGA,CAAC;AAEJ,eAAO,MAAM,kBAAkB,eACjB,UAAU,iBACP,MAAM,KACpB,MAWF,CAAC;AAEF,4DAA4D;AAC5D,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
import { writeResolvedComment, writeSetAsideComment, } from 'pr-report-core';
|
|
8
|
+
import { Arr } from 'ts-data-forge';
|
|
9
|
+
import { isoSeconds } from '../lib/index.mjs';
|
|
10
|
+
import { lastLines } from './util.mjs';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export const setAsideCommentBody = (skip, defaultBranch) => {
|
|
17
|
+
const failedChecks = skip.failedChecks ?? [];
|
|
18
|
+
const output = skip.output?.trim() ?? '';
|
|
19
|
+
return writeSetAsideComment({ reason: skip.reason, headSha: skip.headSha, baseSha: skip.baseSha }, [
|
|
20
|
+
`**\`unblock-prs\` set this pull request aside** (\`${skip.reason}\`): ${escapeMarkdown(skip.detail.replaceAll(/\s+/gu, ' ').trim())}`,
|
|
21
|
+
...(Arr.isNonEmpty(failedChecks)
|
|
22
|
+
? [
|
|
23
|
+
'',
|
|
24
|
+
'Failed required checks:',
|
|
25
|
+
'',
|
|
26
|
+
...failedChecks.map(({ name, link }) => link === ''
|
|
27
|
+
? `- ${escapeMarkdown(name)}`
|
|
28
|
+
: `- [${escapeMarkdown(name)}](${link})`),
|
|
29
|
+
]
|
|
30
|
+
: []),
|
|
31
|
+
...(output === ''
|
|
32
|
+
? []
|
|
33
|
+
: [
|
|
34
|
+
'',
|
|
35
|
+
'<details><summary>What the command printed</summary>',
|
|
36
|
+
'',
|
|
37
|
+
fenced(tailOf(output)),
|
|
38
|
+
'',
|
|
39
|
+
'</details>',
|
|
40
|
+
]),
|
|
41
|
+
...(skip.reason === 'awaiting-bypass'
|
|
42
|
+
? [
|
|
43
|
+
'',
|
|
44
|
+
"Nothing but a ruleset bypass merges it, which is a person's to do; auto-merge was left off.",
|
|
45
|
+
]
|
|
46
|
+
: []),
|
|
47
|
+
'',
|
|
48
|
+
`Set aside at \`${short(skip.headSha)}\`, with \`${defaultBranch}\` at \`${short(skip.baseSha)}\`. ${stays(skip.reason, defaultBranch)}`,
|
|
49
|
+
].join('\n'));
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const stays = (reason, defaultBranch) => reason === 'checks-failed'
|
|
53
|
+
? 'It stays aside until the branch is pushed again: rebasing it would only put the same failing checks through again.'
|
|
54
|
+
: reason === 'awaiting-bypass'
|
|
55
|
+
? `It stays aside until the branch is pushed again: rebasing it would only put the same checks through again. Tick the retry box to have it rebased and checked on the current \`${defaultBranch}\`.`
|
|
56
|
+
: `It stays aside until the branch is pushed again or \`${defaultBranch}\` moves.`;
|
|
57
|
+
|
|
58
|
+
export const resolvedCommentBody = (setAside, resolvedBy, defaultBranch, atEpochMs) => writeResolvedComment(`Resolved at ${isoSeconds(atEpochMs)}: no longer set aside (\`${setAside.reason}\` at \`${short(setAside.headSha)}\`) — ${describeResolvedBy(resolvedBy, defaultBranch)}.`);
|
|
59
|
+
export const describeResolvedBy = (resolvedBy, defaultBranch) => {
|
|
60
|
+
switch (resolvedBy) {
|
|
61
|
+
case 'base-moved':
|
|
62
|
+
return `\`${defaultBranch}\` moved`;
|
|
63
|
+
case 'pushed':
|
|
64
|
+
return 'the branch was pushed';
|
|
65
|
+
case 'retry':
|
|
66
|
+
return 'a retry was asked for';
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
const OUTPUT_LINES = 60;
|
|
75
|
+
const OUTPUT_CHARS = 20_000;
|
|
76
|
+
const tailOf = (output) => {
|
|
77
|
+
const kept = lastLines(output, OUTPUT_LINES);
|
|
78
|
+
const cut = kept.length > OUTPUT_CHARS ? kept.slice(-OUTPUT_CHARS) : kept;
|
|
79
|
+
return cut === output ? cut : `…\n${cut}`;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const fenced = (text) => {
|
|
83
|
+
const longest = Math.max(0, ...Array.from(text.matchAll(/`+/gu), ([run]) => run.length));
|
|
84
|
+
const fence = '`'.repeat(Math.max(3, longest + 1));
|
|
85
|
+
return [`${fence}text`, text, fence].join('\n');
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
const escapeMarkdown = (text) => text.replaceAll(/[\\`*_[\]<>|~@]/gu, String.raw `\$&`);
|
|
92
|
+
const short = (sha) => sha.slice(0, 10);
|
|
93
|
+
//# sourceMappingURL=set-aside-comment.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-aside-comment.mjs","sourceRoot":"","sources":["../../src/unblock-prs/set-aside-comment.mts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GAErB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,IAAgB,EAChB,aAAqB,EACb,EAAE;IACV,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,IAAI,EAAE,CAAC;IAE7C,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAEzC,OAAO,oBAAoB,CACzB,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,EACrE;QACE,sDAAsD,IAAI,CAAC,MAAM,QAAQ,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE;QACtI,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,YAAY,CAAC;YAC9B,CAAC,CAAC;gBACE,EAAE;gBACF,yBAAyB;gBACzB,EAAE;gBACF,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CACrC,IAAI,KAAK,EAAE;oBACT,CAAC,CAAC,KAAK,cAAc,CAAC,IAAI,CAAC,EAAE;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CAAC,CAAC;AAClD,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,cAAc,GAAG,CAAC,IAAY,EAAU,EAAE,CAC9C,IAAI,CAAC,UAAU,CAAC,mBAAmB,EAAE,MAAM,CAAC,GAAG,CAAA,KAAK,CAAC,CAAC;AAExD,MAAM,KAAK,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one sentence a set-aside record carries: what the log says, and what
|
|
3
|
+
* the comment on the pull request leads with.
|
|
4
|
+
*
|
|
5
|
+
* Each says what a reader would otherwise have to go and find — which check,
|
|
6
|
+
* which file, which hold — rather than restate the reason. The comment has
|
|
7
|
+
* room for more, and `set-aside-comment.mts` adds it: the failed checks with
|
|
8
|
+
* their runs, and what the command printed.
|
|
9
|
+
*/
|
|
10
|
+
import type { ChecksSummary } from './types.mjs';
|
|
11
|
+
/**
|
|
12
|
+
* The failed required checks by name, and each with its run, which the
|
|
13
|
+
* comment links so that the failure itself is one click away.
|
|
14
|
+
*/
|
|
15
|
+
export declare const describeFailedChecks: (summary: ChecksSummary) => Readonly<{
|
|
16
|
+
detail: string;
|
|
17
|
+
failedChecks: ChecksSummary['failedRuns'];
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* What holds a pull request whose required checks are all green.
|
|
21
|
+
* `reviewDecision` is GitHub's: `REVIEW_REQUIRED` when a review the
|
|
22
|
+
* rules ask for is missing, which with `required_approving_review_count: 0`
|
|
23
|
+
* leaves a code owner's; empty when the rules ask for none.
|
|
24
|
+
*/
|
|
25
|
+
export declare const describeHold: (mergeStateStatus: string, reviewDecision: string | undefined) => string;
|
|
26
|
+
/** What the watch was still waiting on when it gave up. */
|
|
27
|
+
export declare const describeTimeout: (summary: ChecksSummary, timeoutMin: number) => string;
|
|
28
|
+
/**
|
|
29
|
+
* The files a rebase stopped on, or when git named none — a rebase can fail
|
|
30
|
+
* before it reaches a merge — the end of what it printed.
|
|
31
|
+
*/
|
|
32
|
+
export declare const describeConflict: (conflicted: readonly string[], output: string, onto: string) => string;
|
|
33
|
+
/**
|
|
34
|
+
* The end of what a failed command printed. Node's message starts with
|
|
35
|
+
* `Command failed: <the command>`, which says nothing the reason does not and
|
|
36
|
+
* crowds out what does: an arm that failed was once reported as its own
|
|
37
|
+
* GraphQL mutation, cut off before GitHub's answer. Only a command that
|
|
38
|
+
* printed nothing is left with that line.
|
|
39
|
+
*/
|
|
40
|
+
export declare const describeCommandFailure: (message: string) => string;
|
|
41
|
+
//# sourceMappingURL=set-aside-detail.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-aside-detail.d.mts","sourceRoot":"","sources":["../../src/unblock-prs/set-aside-detail.mts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,YACtB,aAAa,KACrB,QAAQ,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA;CAAE,CAI5D,CAAC;AAEd;;;;;GAKG;AACH,eAAO,MAAM,YAAY,qBACL,MAAM,kBACR,MAAM,GAAG,SAAS,KACjC,MAQF,CAAC;AAEF,2DAA2D;AAC3D,eAAO,MAAM,eAAe,YACjB,aAAa,cACV,MAAM,KACjB,MACiF,CAAC;AAErF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,eACf,SAAS,MAAM,EAAE,UACrB,MAAM,QACR,MAAM,KACX,MAGqF,CAAC;AAEzF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,YAAa,MAAM,KAAG,MAOxD,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
import { Arr } from 'ts-data-forge';
|
|
11
|
+
import { describeWaitingOn } from './checks.mjs';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export const describeFailedChecks = (summary) => ({
|
|
17
|
+
detail: `failed: ${summary.failed.join(', ')}`,
|
|
18
|
+
failedChecks: summary.failedRuns,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
export const describeHold = (mergeStateStatus, reviewDecision) => {
|
|
27
|
+
const head = `green but ${mergeStateStatus}`;
|
|
28
|
+
return reviewDecision === 'REVIEW_REQUIRED'
|
|
29
|
+
? `${head}: a required review is missing (a code owner?)`
|
|
30
|
+
: reviewDecision === 'CHANGES_REQUESTED'
|
|
31
|
+
? `${head}: changes requested`
|
|
32
|
+
: `${head}: an unresolved conversation, or armed by who may not merge?`;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const describeTimeout = (summary, timeoutMin) => `after ${timeoutMin} min, still waiting on ${describeWaitingOn(summary)}`;
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
export const describeConflict = (conflicted, output, onto) => Arr.isNonEmpty(conflicted)
|
|
41
|
+
? `conflicts with ${onto} in ${conflicted.join(', ')}`
|
|
42
|
+
: `rebase onto ${onto} failed: ${output.replaceAll(/\s+/gu, ' ').trim()}`;
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
export const describeCommandFailure = (message) => {
|
|
51
|
+
const lines = message.trim().split('\n');
|
|
52
|
+
const printed = lines[0]?.startsWith(COMMAND_FAILED) === true ? Arr.tail(lines) : lines;
|
|
53
|
+
return Arr.takeLast(Arr.isNonEmpty(printed) ? printed : lines, 2).join('\n');
|
|
54
|
+
};
|
|
55
|
+
const COMMAND_FAILED = 'Command failed: ';
|
|
56
|
+
//# sourceMappingURL=set-aside-detail.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-aside-detail.mjs","sourceRoot":"","sources":["../../src/unblock-prs/set-aside-detail.mts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGjD;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,OAAsB,EACmD,EAAE,CAC3E,CAAC;IACC,MAAM,EAAE,WAAW,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;IAC9C,YAAY,EAAE,OAAO,CAAC,UAAU;CACjC,CAAU,CAAC;AAEd;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,gBAAwB,EACxB,cAAkC,EAC1B,EAAE;IACV,MAAM,IAAI,GAAG,aAAa,gBAAgB,EAAW,CAAC;IAEtD,OAAO,cAAc,KAAK,iBAAiB;QACzC,CAAC,CAAC,GAAG,IAAI,gDAAgD;QACzD,CAAC,CAAC,cAAc,KAAK,mBAAmB;YACtC,CAAC,CAAC,GAAG,IAAI,qBAAqB;YAC9B,CAAC,CAAC,GAAG,IAAI,8DAA8D,CAAC;AAC9E,CAAC,CAAC;AAEF,2DAA2D;AAC3D,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,OAAsB,EACtB,UAAkB,EACV,EAAE,CACV,SAAS,UAAU,0BAA0B,iBAAiB,CAAC,OAAO,CAAC,EAAW,CAAC;AAErF;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,UAA6B,EAC7B,MAAc,EACd,IAAY,EACJ,EAAE,CACV,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC;IACxB,CAAC,CAAE,kBAAkB,IAAI,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAY;IACjE,CAAC,CAAE,eAAe,IAAI,YAAY,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAY,CAAC;AAEzF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,OAAe,EAAU,EAAE;IAChE,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAEzC,MAAM,OAAO,GACX,KAAK,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAE1E,OAAO,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC/E,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the loop remembers about a pull request it has given up on, and for
|
|
3
|
+
* how long.
|
|
4
|
+
*/
|
|
5
|
+
import { type SetAside } from 'pr-report-core';
|
|
6
|
+
import type { ResolvedBy } from './set-aside-comment.mjs';
|
|
7
|
+
import type { OwnSetAsideComment, PullRequest, SkipRecord, SkipRecords } from './types.mjs';
|
|
8
|
+
/**
|
|
9
|
+
* A verdict lasts as long as the state it was reached in. Every reason is
|
|
10
|
+
* tied to the head, so a push to the branch clears it; all but
|
|
11
|
+
* `checks-failed` are tied to the base as well.
|
|
12
|
+
*
|
|
13
|
+
* The base is what makes the difference to a pull request that sat green
|
|
14
|
+
* without merging or ran out of watch time: once the base moves that pull
|
|
15
|
+
* request is `BEHIND`, which is the one thing this script knows how to fix,
|
|
16
|
+
* and a verdict that outlived its state is what left a ready pull request
|
|
17
|
+
* sitting still through cycle after cycle of "Nothing to do". One that sat
|
|
18
|
+
* green goes back in the running last, not first — `demotions.mts`. A rebase or
|
|
19
|
+
* push failure is tied to the base for the older reason: the commit it
|
|
20
|
+
* conflicted with may have gone with it.
|
|
21
|
+
*
|
|
22
|
+
* `checks-failed` is deliberately not tied to the base. Rebasing it would put
|
|
23
|
+
* the same failing matrix through again, and fixing the failure is the
|
|
24
|
+
* skill's job, not this script's — the push that carries the fix is what
|
|
25
|
+
* clears it. Nor is `awaiting-bypass`: the bypass merge it waits for does not
|
|
26
|
+
* wait for the base, and a rebase each time anything else merged would run
|
|
27
|
+
* the matrix again for nothing. Its comment's retry box is how a person asks
|
|
28
|
+
* for a run on the current tip.
|
|
29
|
+
*
|
|
30
|
+
* The rule is `pr-report-core`'s `setAsideApplies`, because the Pull Requests
|
|
31
|
+
* Manager page applies the same rule to the comment this script leaves on
|
|
32
|
+
* the pull request, and so does {@link settleSkips} here.
|
|
33
|
+
*/
|
|
34
|
+
export declare const skipStillApplies: (skip: SkipRecord, pr: PullRequest, baseSha: string) => boolean;
|
|
35
|
+
/** Drops records for pull requests that are gone or have moved on. */
|
|
36
|
+
export declare const pruneSkips: (skipped: SkipRecords, pullRequests: readonly PullRequest[], baseSha: string) => SkipRecords;
|
|
37
|
+
export declare const withSkip: (skipped: SkipRecords, skip: SkipRecord) => SkipRecords;
|
|
38
|
+
/**
|
|
39
|
+
* The records in `after` that `before` did not have — a pull request newly
|
|
40
|
+
* set aside, or set aside again for a different reason or in a different
|
|
41
|
+
* state. What the loop writes to GitHub, once each, rather than on every
|
|
42
|
+
* survey that finds the same record standing.
|
|
43
|
+
*
|
|
44
|
+
* `before` is what the cycle acted from, after {@link settleSkips}, so that a
|
|
45
|
+
* record read back from a comment is not written over that comment again.
|
|
46
|
+
*/
|
|
47
|
+
export declare const newSkips: (before: SkipRecords, after: SkipRecords) => readonly SkipRecord[];
|
|
48
|
+
/**
|
|
49
|
+
* The records no comment says: never written, because the write failed, or
|
|
50
|
+
* written over since. Until it is written the worker holds the pull request
|
|
51
|
+
* aside while every other reader of the queue (`owner.mts`) reads it as the
|
|
52
|
+
* worker's, and each leaves it to the other; so the loop writes these again.
|
|
53
|
+
*/
|
|
54
|
+
export declare const unannouncedSkips: (skipped: SkipRecords, comments: ReadonlyMap<number, OwnSetAsideComment>) => readonly SkipRecord[];
|
|
55
|
+
/**
|
|
56
|
+
* What this account's set-aside comments on the open pull requests say, laid
|
|
57
|
+
* over the records: the comments to rewrite as resolved, and the records to
|
|
58
|
+
* act from.
|
|
59
|
+
*
|
|
60
|
+
* - **Ended**: a comment set aside at a head that has moved, or against a
|
|
61
|
+
* base that has — by the same rule as the records, {@link skipStillApplies}
|
|
62
|
+
* — is rewritten as resolved.
|
|
63
|
+
* - **Retry**: a comment whose box a person ticked is rewritten as resolved,
|
|
64
|
+
* and the record goes with it, so this cycle's triage treats the pull
|
|
65
|
+
* request as if it had never been set aside. One that fails again is set
|
|
66
|
+
* aside again, and its comment says so again.
|
|
67
|
+
* - **Standing, and this run does not know it**: a record an earlier run
|
|
68
|
+
* reached, which is taken up as it stands rather than tried again — a
|
|
69
|
+
* rebase that conflicted would conflict the same way.
|
|
70
|
+
*
|
|
71
|
+
* A record this run holds is left as it is otherwise: the comment says what
|
|
72
|
+
* the record said when it was written.
|
|
73
|
+
*/
|
|
74
|
+
export declare const settleSkips: (skipped: SkipRecords, comments: ReadonlyMap<number, OwnSetAsideComment>, pullRequests: readonly PullRequest[], baseSha: string) => Readonly<{
|
|
75
|
+
skipped: SkipRecords;
|
|
76
|
+
resolved: readonly Resolution[];
|
|
77
|
+
}>;
|
|
78
|
+
/** A set-aside comment to rewrite as resolved, and why. */
|
|
79
|
+
export type Resolution = Readonly<{
|
|
80
|
+
number: number;
|
|
81
|
+
databaseId: number;
|
|
82
|
+
setAside: SetAside;
|
|
83
|
+
resolvedBy: ResolvedBy;
|
|
84
|
+
}>;
|
|
85
|
+
//# sourceMappingURL=skips.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skips.d.mts","sourceRoot":"","sources":["../../src/unblock-prs/skips.mts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAIL,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EACV,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,WAAW,EACZ,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,gBAAgB,SACrB,UAAU,MACZ,WAAW,WACN,MAAM,KACd,OAAwD,CAAC;AAE5D,sEAAsE;AACtE,eAAO,MAAM,UAAU,YACZ,WAAW,gBACN,SAAS,WAAW,EAAE,WAC3B,MAAM,KACd,WASA,CAAC;AAEJ,eAAO,MAAM,QAAQ,YAAa,WAAW,QAAQ,UAAU,KAAG,WACtB,CAAC;AAE7C;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,WACX,WAAW,SACZ,WAAW,KACjB,SAAS,UAAU,EASlB,CAAC;AAEL;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,YAClB,WAAW,YACV,WAAW,CAAC,MAAM,EAAE,kBAAkB,CAAC,KAChD,SAAS,UAAU,EASlB,CAAC;AAEL;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,YACb,WAAW,YACV,WAAW,CAAC,MAAM,EAAE,kBAAkB,CAAC,gBACnC,SAAS,WAAW,EAAE,WAC3B,MAAM,KACd,QAAQ,CAAC;IAAE,OAAO,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,SAAS,UAAU,EAAE,CAAA;CAAE,CAiEpE,CAAC;AAEF,2DAA2D;AAC3D,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
import { isSetAsideReason, setAsideApplies, setAsideStillApplies, } from 'pr-report-core';
|
|
6
|
+
import { Arr } from 'ts-data-forge';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
export const skipStillApplies = (skip, pr, baseSha) => setAsideApplies(skip, pr.headRefOid, baseSha);
|
|
34
|
+
|
|
35
|
+
export const pruneSkips = (skipped, pullRequests, baseSha) => new Map(Array.from(skipped.values())
|
|
36
|
+
.filter((skip) => {
|
|
37
|
+
const pr = pullRequests.find((p) => p.number === skip.number);
|
|
38
|
+
return pr !== undefined && skipStillApplies(skip, pr, baseSha);
|
|
39
|
+
})
|
|
40
|
+
.map((skip) => [skip.number, skip]));
|
|
41
|
+
export const withSkip = (skipped, skip) => new Map([...skipped, [skip.number, skip]]);
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
export const newSkips = (before, after) => Array.from(after.values()).filter((skip) => {
|
|
52
|
+
const previous = before.get(skip.number);
|
|
53
|
+
return (previous?.headSha !== skip.headSha ||
|
|
54
|
+
previous.baseSha !== skip.baseSha ||
|
|
55
|
+
previous.reason !== skip.reason);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
export const unannouncedSkips = (skipped, comments) => Array.from(skipped.values()).filter((skip) => {
|
|
64
|
+
const says = comments.get(skip.number)?.says;
|
|
65
|
+
return (says?.kind !== 'standing' ||
|
|
66
|
+
says.setAside.headSha !== skip.headSha ||
|
|
67
|
+
says.setAside.reason !== skip.reason);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
export const settleSkips = (skipped, comments, pullRequests, baseSha) => {
|
|
89
|
+
const judged = Array.from(comments).flatMap(([number, comment]) => {
|
|
90
|
+
const pr = pullRequests.find((p) => p.number === number);
|
|
91
|
+
if (pr === undefined || comment.says.kind === 'resolved') {
|
|
92
|
+
return [];
|
|
93
|
+
}
|
|
94
|
+
const { setAside, retry } = comment.says;
|
|
95
|
+
const resolvedBy = setAside.headSha !== pr.headRefOid
|
|
96
|
+
? 'pushed'
|
|
97
|
+
: !setAsideStillApplies(setAside, baseSha)
|
|
98
|
+
? 'base-moved'
|
|
99
|
+
: retry
|
|
100
|
+
? 'retry'
|
|
101
|
+
: undefined;
|
|
102
|
+
return [
|
|
103
|
+
{ number, databaseId: comment.databaseId, setAside, resolvedBy },
|
|
104
|
+
];
|
|
105
|
+
});
|
|
106
|
+
const retried = new Set(Arr.generate(function* () {
|
|
107
|
+
for (const { number, resolvedBy } of judged) {
|
|
108
|
+
if (resolvedBy === 'retry') {
|
|
109
|
+
yield number;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}));
|
|
113
|
+
const taken = Arr.generate(function* () {
|
|
114
|
+
for (const { number, setAside, resolvedBy } of judged) {
|
|
115
|
+
if (resolvedBy === undefined &&
|
|
116
|
+
!skipped.has(number) &&
|
|
117
|
+
isSetAsideReason(setAside.reason)) {
|
|
118
|
+
yield {
|
|
119
|
+
number,
|
|
120
|
+
headSha: setAside.headSha,
|
|
121
|
+
baseSha: setAside.baseSha,
|
|
122
|
+
reason: setAside.reason,
|
|
123
|
+
detail: TAKEN_UP_DETAIL,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
return {
|
|
129
|
+
skipped: taken.reduce(withSkip, new Map(Array.from(skipped).filter(([number]) => !retried.has(number)))),
|
|
130
|
+
resolved: Arr.generate(function* () {
|
|
131
|
+
for (const { number, databaseId, setAside, resolvedBy } of judged) {
|
|
132
|
+
if (resolvedBy !== undefined) {
|
|
133
|
+
yield { number, databaseId, setAside, resolvedBy };
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}),
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
const TAKEN_UP_DETAIL = 'set aside by an earlier run, as its comment says';
|
|
141
|
+
//# sourceMappingURL=skips.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skips.mjs","sourceRoot":"","sources":["../../src/unblock-prs/skips.mts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,oBAAoB,GAErB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AASpC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,IAAgB,EAChB,EAAe,EACf,OAAe,EACN,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,EA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