pr-report-core 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/README.md +5 -2
  2. package/dist/branch-rules.d.mts +30 -0
  3. package/dist/branch-rules.d.mts.map +1 -0
  4. package/dist/branch-rules.mjs +71 -0
  5. package/dist/branch-rules.mjs.map +1 -0
  6. package/dist/checks.d.mts +61 -62
  7. package/dist/checks.d.mts.map +1 -1
  8. package/dist/checks.mjs +0 -1
  9. package/dist/checks.mjs.map +1 -1
  10. package/dist/claim.d.mts +21 -15
  11. package/dist/claim.d.mts.map +1 -1
  12. package/dist/claim.mjs +1 -1
  13. package/dist/claim.mjs.map +1 -1
  14. package/dist/closing-issues.d.mts +18 -19
  15. package/dist/closing-issues.d.mts.map +1 -1
  16. package/dist/closing-issues.mjs +0 -1
  17. package/dist/closing-issues.mjs.map +1 -1
  18. package/dist/code-owners.d.mts +33 -34
  19. package/dist/code-owners.d.mts.map +1 -1
  20. package/dist/code-owners.mjs +0 -2
  21. package/dist/code-owners.mjs.map +1 -1
  22. package/dist/index.d.mts +3 -0
  23. package/dist/index.d.mts.map +1 -1
  24. package/dist/index.mjs +3 -0
  25. package/dist/index.mjs.map +1 -1
  26. package/dist/issue-claim.d.mts +56 -0
  27. package/dist/issue-claim.d.mts.map +1 -0
  28. package/dist/issue-claim.mjs +87 -0
  29. package/dist/issue-claim.mjs.map +1 -0
  30. package/dist/issue-priority.d.mts +44 -0
  31. package/dist/issue-priority.d.mts.map +1 -0
  32. package/dist/issue-priority.mjs +91 -0
  33. package/dist/issue-priority.mjs.map +1 -0
  34. package/dist/labels.d.mts +43 -42
  35. package/dist/labels.d.mts.map +1 -1
  36. package/dist/labels.mjs +2 -1
  37. package/dist/labels.mjs.map +1 -1
  38. package/dist/merge-after.d.mts +22 -16
  39. package/dist/merge-after.d.mts.map +1 -1
  40. package/dist/merge-after.mjs +87 -24
  41. package/dist/merge-after.mjs.map +1 -1
  42. package/dist/queue-comments.d.mts +2 -2
  43. package/dist/queue-order.d.mts +32 -32
  44. package/dist/queue-order.mjs +0 -2
  45. package/dist/queue-order.mjs.map +1 -1
  46. package/dist/queue-owner.d.mts +14 -14
  47. package/dist/queue-owner.d.mts.map +1 -1
  48. package/dist/queue-owner.mjs +18 -0
  49. package/dist/queue-owner.mjs.map +1 -1
  50. package/dist/report.d.mts +4 -4
  51. package/dist/review-hold.d.mts +14 -14
  52. package/dist/ruleset.d.mts +12 -13
  53. package/dist/ruleset.d.mts.map +1 -1
  54. package/dist/ruleset.mjs +0 -1
  55. package/dist/ruleset.mjs.map +1 -1
  56. package/dist/set-aside.d.mts +29 -28
  57. package/dist/set-aside.d.mts.map +1 -1
  58. package/dist/set-aside.mjs +2 -0
  59. package/dist/set-aside.mjs.map +1 -1
  60. package/dist/stack.d.mts +14 -15
  61. package/dist/stack.d.mts.map +1 -1
  62. package/dist/stack.mjs +0 -1
  63. package/dist/stack.mjs.map +1 -1
  64. package/dist/start-after.d.mts +20 -21
  65. package/dist/start-after.d.mts.map +1 -1
  66. package/dist/start-after.mjs +0 -1
  67. package/dist/start-after.mjs.map +1 -1
  68. package/dist/summarize.d.mts +2 -2
  69. package/dist/timestamp.d.mts +10 -10
  70. package/dist/tree.d.mts +5 -5
  71. package/dist/types.d.mts +32 -33
  72. package/dist/types.d.mts.map +1 -1
  73. package/package.json +10 -10
  74. package/src/branch-rules.mts +105 -0
  75. package/src/branch-rules.test.mts +221 -0
  76. package/src/checks.mts +64 -65
  77. package/src/checks.test.mts +30 -31
  78. package/src/claim.mts +16 -16
  79. package/src/closing-issues.mts +18 -19
  80. package/src/closing-issues.test.mts +2 -2
  81. package/src/code-owners.mts +39 -41
  82. package/src/index.mts +3 -0
  83. package/src/issue-claim.mts +138 -0
  84. package/src/issue-claim.test.mts +149 -0
  85. package/src/issue-priority.mts +116 -0
  86. package/src/issue-priority.test.mts +71 -0
  87. package/src/labels.mts +43 -42
  88. package/src/merge-after.mts +142 -49
  89. package/src/merge-after.test.mts +80 -3
  90. package/src/queue-comments.mts +2 -2
  91. package/src/queue-order.mts +60 -62
  92. package/src/queue-order.test.mts +6 -6
  93. package/src/queue-owner.mts +46 -25
  94. package/src/queue-owner.test.mts +4 -2
  95. package/src/report.mts +9 -9
  96. package/src/review-hold.mts +14 -14
  97. package/src/review-hold.test.mts +3 -3
  98. package/src/ruleset.mts +12 -13
  99. package/src/set-aside.mts +30 -28
  100. package/src/set-aside.test.mts +22 -0
  101. package/src/stack.mts +14 -15
  102. package/src/stack.test.mts +4 -4
  103. package/src/start-after.mts +20 -21
  104. package/src/summarize.mts +2 -2
  105. package/src/timestamp.mts +14 -14
  106. package/src/tree.mts +5 -5
  107. package/src/types.mts +32 -33
@@ -1 +1 @@
1
- {"version":3,"file":"code-owners.d.mts","sourceRoot":"","sources":["../src/code-owners.mts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B,CAAC,CAAC;AAEH,eAAO,MAAM,eAAe,SAAU,MAAM,KAAG,SAAS,cAAc,EAclE,CAAC;AAEL;;;;GAIG;AACH,eAAO,MAAM,QAAQ,SACb,MAAM,SACL,SAAS,cAAc,EAAE,KAC/B,SAAS,MAAM,EACyD,CAAC;AAE5E;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,kEAOzB,QAAQ,CAAC;IACV,6DAA6D;IAC7D,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IACjC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,8DAA8D;IAC9D,aAAa,EAAE,OAAO,CAAC;IACvB,2CAA2C;IAC3C,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,MAAM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KAAG,eAsDJ,CAAC;AA2DF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAClC;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,GACrB;IAAE,KAAK,EAAE,cAAc,CAAA;CAAE,GACzB;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC/C;IACE,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;CACrB,CACJ,CAAC"}
@@ -49,7 +49,6 @@ export const ownersOf = (path, rules) => rules.findLast((rule) => toRegExp(rule.
49
49
 
50
50
 
51
51
 
52
-
53
52
  export const codeOwnerReview = ({ required, rules, files, filesComplete, approvers, author, }) => {
54
53
  if (!required) {
55
54
  return { state: 'not-required' };
@@ -120,7 +119,6 @@ const toRegExp = (pattern) => {
120
119
 
121
120
 
122
121
 
123
-
124
122
  const tail = directory
125
123
  ? '/.+'
126
124
  : (trimmed.split('/').at(-1) ?? '').includes('*')
@@ -1 +1 @@
1
- {"version":3,"file":"code-owners.mjs","sourceRoot":"","sources":["../src/code-owners.mts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAWpC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAY,EAA6B,EAAE,CACzE,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC;IACpB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,MAAM,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAErE,IAAI,OA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3E,8DAA8D;IAC9D,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAElE,MAAM,IAAI,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAEzC,6EAA6E;IAC7E,6EAA6E;IAC7E,0EAA0E;IAC1E,wEAAwE;IACxE,MAAM,IAAI,GAAG,SAAS;QACpB,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC;YAC/C,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,UAAU,CAAC;IAEjB,8DAA8D;IAC9D,OAAO,IAAI,MAAM,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,EAAE,GAAG,CAAC,CAAC;AAC1E,CAAC,CAAC;AAyBF,sEAAsE;AACtE,MAAM,MAAM,GAAG,CAAC,KAAa,EAAW,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC"}
package/dist/index.d.mts CHANGED
@@ -1,7 +1,10 @@
1
+ export * from './branch-rules.mjs';
1
2
  export * from './checks.mjs';
2
3
  export * from './claim.mjs';
3
4
  export * from './closing-issues.mjs';
4
5
  export * from './code-owners.mjs';
6
+ export * from './issue-claim.mjs';
7
+ export * from './issue-priority.mjs';
5
8
  export * from './labels.mjs';
6
9
  export * from './merge-after.mjs';
7
10
  export * from './queue-comments.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
package/dist/index.mjs CHANGED
@@ -1,7 +1,10 @@
1
+ export * from './branch-rules.mjs';
1
2
  export * from './checks.mjs';
2
3
  export * from './claim.mjs';
3
4
  export * from './closing-issues.mjs';
4
5
  export * from './code-owners.mjs';
6
+ export * from './issue-claim.mjs';
7
+ export * from './issue-priority.mjs';
5
8
  export * from './labels.mjs';
6
9
  export * from './merge-after.mjs';
7
10
  export * from './queue-comments.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Who has started an issue, or means to, written where every session can read
3
+ * it.
4
+ *
5
+ * The `in-progress` and `planned` labels (`labels.mts`) say that someone is on
6
+ * an issue, not who: every session writes as the same account, so neither the
7
+ * labels nor the assignees tell two of them apart, and a session refused by a
8
+ * label cannot say whose it is. So `start-issue` also writes a comment whose
9
+ * first line is a hidden record this module writes and reads, naming the
10
+ * claimant (a session URL, or any other word unique to it; `claim.mts`'s
11
+ * `isClaimant`).
12
+ *
13
+ * **A start lasts until it is released**, as the label always has: the pull
14
+ * request that closes the issue is what ends it. **A plan lapses** after
15
+ * {@link PLANNED_CLAIM_LIFETIME_HOURS}, since it holds nothing back and a
16
+ * session that meant to start next may never get there; a claimant still
17
+ * meaning to writes it again.
18
+ *
19
+ * **One comment per issue, edited in place**, as for the pull request claim; of
20
+ * several, the oldest is the one, so two claimants writing at once both read
21
+ * back the same answer — which a label cannot give, having no order to read.
22
+ *
23
+ * **Only the comments the reader's own account wrote count**: the repository is
24
+ * public.
25
+ */
26
+ import type { OwnComment, QueueComment } from './queue-comments.mjs';
27
+ /** How long a plan lasts when it is not written again. */
28
+ export declare const PLANNED_CLAIM_LIFETIME_HOURS = 24;
29
+ export type IssueClaim = Readonly<{
30
+ /** Started (`in-progress`) or meant to be started next (`planned`). */
31
+ state: 'planned' | 'started';
32
+ /** Who claimed it: a session URL, or any other word unique to the claimant. */
33
+ by: string;
34
+ /** When, as a UTC instant to the second (`2026-10-12T01:00:00Z`). */
35
+ at: string;
36
+ }>;
37
+ export type IssueClaimComment = Readonly<{
38
+ kind: 'released';
39
+ } | {
40
+ kind: 'standing';
41
+ claim: IssueClaim;
42
+ }>;
43
+ /** The record line, then `prose`. */
44
+ export declare const writeIssueClaimComment: (claim: IssueClaim, prose: string) => string;
45
+ /** The record line saying the claim was given up, and `prose`. */
46
+ export declare const writeReleasedIssueClaimComment: (prose: string) => string;
47
+ /** What the comment says, or `undefined` for a comment this module did not write. */
48
+ export declare const parseIssueClaimComment: (body: string) => IssueClaimComment | undefined;
49
+ /** Whether `claim` still holds the issue at `nowEpochMs`. */
50
+ export declare const issueClaimApplies: (claim: IssueClaim, nowEpochMs: number) => boolean;
51
+ /**
52
+ * Reads `comments`, oldest first, for the oldest claim comment, and whether it
53
+ * still holds; `undefined` when there is none.
54
+ */
55
+ export declare const readIssueClaim: (comments: readonly OwnComment[], nowEpochMs: number) => QueueComment<IssueClaimComment> | undefined;
56
+ //# sourceMappingURL=issue-claim.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue-claim.d.mts","sourceRoot":"","sources":["../src/issue-claim.mts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGrE,0DAA0D;AAC1D,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAE/C,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,uEAAuE;IACvE,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,+EAA+E;IAC/E,EAAE,EAAE,MAAM,CAAC;IACX,qEAAqE;IACrE,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CACtC;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CAC/D,CAAC;AAEF,qCAAqC;AACrC,eAAO,MAAM,sBAAsB,UAC1B,UAAU,SACV,MAAM,KACZ,MAKW,CAAC;AAEf,kEAAkE;AAClE,eAAO,MAAM,8BAA8B,UAAW,MAAM,KAAG,MACN,CAAC;AAE1D,qFAAqF;AACrF,eAAO,MAAM,sBAAsB,SAC3B,MAAM,KACX,iBAAiB,GAAG,SAwBtB,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,iBAAiB,UACrB,UAAU,cACL,MAAM,KACjB,OASF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,aACf,SAAS,UAAU,EAAE,cACnB,MAAM,KACjB,YAAY,CAAC,iBAAiB,CAAC,GAAG,SAepC,CAAC"}
@@ -0,0 +1,87 @@
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
+ import { CLOCK_SKEW_MINUTES } from './claim.mjs';
27
+ import { epochMsOf } from './timestamp.mjs';
28
+
29
+ export const PLANNED_CLAIM_LIFETIME_HOURS = 24;
30
+
31
+ export const writeIssueClaimComment = (claim, prose) => [
32
+ `${MARKER} state=${claim.state} by=${claim.by} at=${claim.at} -->`,
33
+ '',
34
+ prose.trim(),
35
+ ].join('\n');
36
+
37
+ export const writeReleasedIssueClaimComment = (prose) => [`${MARKER} released -->`, '', prose.trim()].join('\n');
38
+
39
+ export const parseIssueClaimComment = (body) => {
40
+ const first = body.trim().split(/\r?\n/u, 1)[0]?.trim();
41
+ if (first === undefined) {
42
+ return undefined;
43
+ }
44
+ if (first === `${MARKER} released -->`) {
45
+ return { kind: 'released' };
46
+ }
47
+ const groups = STANDING_LINE.exec(first)?.groups;
48
+ const state = groups?.['state'];
49
+ const by = groups?.['by'];
50
+ const at = groups?.['at'];
51
+ return by === undefined ||
52
+ at === undefined ||
53
+ (state !== 'planned' && state !== 'started')
54
+ ? undefined
55
+ : { kind: 'standing', claim: { state, by, at } };
56
+ };
57
+
58
+ export const issueClaimApplies = (claim, nowEpochMs) => {
59
+ const at = epochMsOf(claim.at);
60
+ return (at !== undefined &&
61
+ at - CLOCK_SKEW_MINUTES * MS_PER_MINUTE <= nowEpochMs &&
62
+ (claim.state === 'started' ||
63
+ nowEpochMs < at + PLANNED_CLAIM_LIFETIME_HOURS * MS_PER_HOUR));
64
+ };
65
+
66
+
67
+
68
+
69
+ export const readIssueClaim = (comments, nowEpochMs) => {
70
+ for (const { id, body } of comments) {
71
+ const says = parseIssueClaimComment(body);
72
+ if (says !== undefined) {
73
+ return {
74
+ commentId: id,
75
+ says,
76
+ applies: says.kind === 'standing' && issueClaimApplies(says.claim, nowEpochMs),
77
+ };
78
+ }
79
+ }
80
+ return undefined;
81
+ };
82
+ const MS_PER_MINUTE = 60_000;
83
+ const MS_PER_HOUR = 60 * MS_PER_MINUTE;
84
+
85
+ const MARKER = '<!-- start-issue:claim';
86
+ const STANDING_LINE = /^<!-- start-issue:claim state=(?<state>planned|started) by=(?<by>[^\s>]+) at=(?<at>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z) -->$/u;
87
+ //# sourceMappingURL=issue-claim.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue-claim.mjs","sourceRoot":"","sources":["../src/issue-claim.mts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,0DAA0D;AAC1D,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,CAAC;AAe/C,qCAAqC;AACrC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,KAAiB,EACjB,KAAa,EACL,EAAE,CACV;IACE,GAAG,MAAM,UAAU,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC,EAAE,MAAM;IAClE,EAAE;IACF,KAAK,CAAC,IAAI,EAAE;CACb,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEf,kEAAkE;AAClE,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,KAAa,EAAU,EAAE,CACtE,CAAC,GAAG,MAAM,eAAe,EAAE,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,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AC,KAAK,CAAC,KAAK,KAAK,SAAS;YACxB,UAAU,GAAG,EAAE,GAAG,4BAA4B,GAAG,WAAW,CAAC,CAChE,CAAC;AACJ,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,QAA+B,EAC/B,UAAkB,EAC2B,EAAE;IAC/C,KAAK,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,QAAQ,EAAE,CAAC;QACpC,MAAM,IAAI,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAC;QAE1C,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO;gBACL,SAAS,EAAE,EAAE;gBACb,IAAI;gBACJ,OAAO,EACL,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC;aACxE,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,MAAM,CAAC;AAE7B,MAAM,WAAW,GAAG,EAAE,GAAG,aAAa,CAAC;AAEvC,sEAAsE;AACtE,MAAM,MAAM,GAAG,wBAAwB,CAAC;AAExC,MAAM,aAAa,GACjB,gIAAgI,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * How soon an open issue should be started: one `priority:<tier>` label each,
3
+ * decided when the issue is filed. What each tier means, and how an issue is
4
+ * placed in one, is `docs/issue-priority.md`.
5
+ *
6
+ * These are issue labels. A pull request's place in the merge queue is
7
+ * `priority:high` / `priority:low` (`labels.mts`), which no issue carries.
8
+ */
9
+ /** The tier the one `priority:<tier>` label names, `none`, or `several`. */
10
+ export declare const issuePriorityOfLabels: (labels: readonly string[]) => IssuePriority | 'none' | 'several';
11
+ /**
12
+ * Where an issue goes in the order it is started in, as a sort key: `S` first,
13
+ * then `A`, `B` and `C`, then one with no tier or several, then `D`. What
14
+ * nobody has placed is not known to matter less than what was placed last.
15
+ * `hold` and `close` rank with no tier here; whoever takes issues in this order
16
+ * leaves them out first.
17
+ */
18
+ export declare const issueStartRank: (labels: readonly string[]) => number;
19
+ /** The tier as written on a command line, or `undefined` for anything else. */
20
+ export declare const parseIssuePriority: (raw: string) => IssuePriority | undefined;
21
+ export declare const issuePriorityLabel: (priority: IssuePriority) => `priority:${IssuePriority}`;
22
+ /**
23
+ * Every tier, the order `docs/issue-priority.md` lists them in.
24
+ *
25
+ * - `S` — speeds up the work on everything else now: CI, `check-changed`, the
26
+ * merge queue, the review loop, a step a person does by hand most days.
27
+ * - `A` — what the rest of that stands on, a step a person does by hand on
28
+ * every release or deploy, a security issue, or a bug real users meet that
29
+ * stops what they came to do.
30
+ * - `B` — the other bugs in an app with users or in a published package, and
31
+ * smaller gains in speed.
32
+ * - `C` — documents, refactoring, small improvements and features.
33
+ * - `D` — an app nobody uses but its author, and large features.
34
+ * - `hold` — not to be started as things stand: code about to be replaced, or
35
+ * work waiting on a decision.
36
+ * - `close` — to be closed or folded into another issue at the next triage.
37
+ *
38
+ * `pr-manager`'s tier tooltips (`issue-tier-group.tsx`) repeat this list.
39
+ */
40
+ export declare const ISSUE_PRIORITIES: readonly ['S', 'A', 'B', 'C', 'D', 'hold', 'close'];
41
+ export type IssuePriority = (typeof ISSUE_PRIORITIES)[number];
42
+ /** The tiers a new issue may be filed under: `close` is a verdict on one. */
43
+ export declare const FILING_PRIORITIES: readonly ["S", "A", "B", "C", "D", "hold"];
44
+ //# sourceMappingURL=issue-priority.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue-priority.d.mts","sourceRoot":"","sources":["../src/issue-priority.mts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,WACxB,SAAS,MAAM,EAAE,KACxB,aAAa,GAAG,MAAM,GAAG,SAe3B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,WAAY,SAAS,MAAM,EAAE,KAAG,MAM1D,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,kBAAkB,QAAS,MAAM,KAAG,aAAa,GAAG,SACV,CAAC;AAExD,eAAO,MAAM,kBAAkB,aACnB,aAAa,KACtB,YAAY,aAAa,EAAqC,CAAC;AAElE;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,YAC3B,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,MAAM,EACN,OAAO,CACC,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,4CAOe,CAAC"}
@@ -0,0 +1,91 @@
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+ export const issuePriorityOfLabels = (labels) => {
11
+ const carried = ISSUE_PRIORITIES.filter((priority) => labels.includes(issuePriorityLabel(priority)));
12
+ switch (carried.length) {
13
+ case 0:
14
+ return 'none';
15
+ case 1:
16
+ return carried[0] ?? 'none';
17
+ default:
18
+ return 'several';
19
+ }
20
+ };
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+ export const issueStartRank = (labels) => {
29
+ const priority = issuePriorityOfLabels(labels);
30
+ return priority === 'none' || priority === 'several'
31
+ ? UNPLACED_RANK
32
+ : rankOf(priority);
33
+ };
34
+
35
+ export const parseIssuePriority = (raw) => ISSUE_PRIORITIES.find((priority) => priority === raw);
36
+ export const issuePriorityLabel = (priority) => `priority:${priority}`;
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+ export const ISSUE_PRIORITIES = [
56
+ 'S',
57
+ 'A',
58
+ 'B',
59
+ 'C',
60
+ 'D',
61
+ 'hold',
62
+ 'close',
63
+ ];
64
+
65
+ export const FILING_PRIORITIES = [
66
+ 'S',
67
+ 'A',
68
+ 'B',
69
+ 'C',
70
+ 'D',
71
+ 'hold',
72
+ ];
73
+ const UNPLACED_RANK = 4;
74
+ const rankOf = (priority) => {
75
+ switch (priority) {
76
+ case 'S':
77
+ return 0;
78
+ case 'A':
79
+ return 1;
80
+ case 'B':
81
+ return 2;
82
+ case 'C':
83
+ return 3;
84
+ case 'D':
85
+ return 5;
86
+ case 'hold':
87
+ case 'close':
88
+ return UNPLACED_RANK;
89
+ }
90
+ };
91
+ //# sourceMappingURL=issue-priority.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue-priority.mjs","sourceRoot":"","sources":["../src/issue-priority.mts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,4EAA4E;AAC5E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,MAAyB,EACW,EAAE;IACtC,MAAM,OAAO,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CACnD,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAC9C,CAAC;IAEF,QAAQ,OAAO,CAAC,MAAM,EAAE,CAAC;QACvB,KAAK,CAAC;YACJ,OAAO,MAAM,CAAC;QAEhB,KAAK,CAAC;YACJ,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;QAE9B;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAyB,EAAU,EAAE;IAClE,MAAM,QAAQ,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAE/C,OAAO,QAAQ,KAAK,MAAM,IAAI,QAAQ,KAAK,SAAS;QAClD,CAAC,CAAC,aAAa;QACf,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AACvB,CAAC,CAAC;AAEF,+EAA+E;AAC/E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAW,EAA6B,EAAE,CAC3E,gBAAgB,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,KAAK,GAAG,CAAC,CAAC;AAExD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,QAAuB,EACM,EAAE,CAAC,YAAY,QAAQ,EAAW,CAAC;AAElE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,MAAM;IACN,OAAO;CACC,CAAC;AAIX,6EAA6E;AAC7E,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,MAAM;CACqC,CAAC;AAE9C,MAAM,aAAa,GAAG,CAAC,CAAC;AAExB,MAAM,MAAM,GAAG,CAAC,QAAuB,EAAU,EAAE;IACjD,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,GAAG;YACN,OAAO,CAAC,CAAC;QAEX,KAAK,GAAG;YACN,OAAO,CAAC,CAAC;QAEX,KAAK,GAAG;YACN,OAAO,CAAC,CAAC;QAEX,KAAK,GAAG;YACN,OAAO,CAAC,CAAC;QAEX,KAAK,GAAG;YACN,OAAO,CAAC,CAAC;QAEX,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO;YACV,OAAO,aAAa,CAAC;IACzB,CAAC;AACH,CAAC,CAAC"}
package/dist/labels.d.mts CHANGED
@@ -1,59 +1,59 @@
1
1
  /**
2
- * The labels this repository's queue is made of. They exist only on GitHub,
3
- * so these strings, and the ones in `.github/workflows/`, are the whole of
4
- * their declaration: `unblock-prs` and `open-pr` act on them, and
5
- * `pr-report` and the Pull Requests Manager page report them.
2
+ * The labels this repository's queue is made of. They exist only on GitHub, so
3
+ * these strings, and the ones in `.github/workflows/`, are the whole of their
4
+ * declaration: `unblock-prs` and `open-pr` act on them, and `pr-report` and the
5
+ * Pull Requests Manager page report them.
6
6
  */
7
7
  /**
8
- * The label that says "not yet": the check workflows skip while it is on
9
- * and `skip-ci-label.yml` holds the merge with a `pending` `no-skip-ci-label`
10
- * status. It is a label, deliberately — a `skip-ci` in the title means
11
- * nothing to any workflow.
8
+ * The label that says "not yet": the check workflows skip while it is on and
9
+ * `skip-ci-label.yml` holds the merge with a `pending` `no-skip-ci-label`
10
+ * status. It is a label, deliberately — a `skip-ci` in the title means nothing
11
+ * to any workflow.
12
12
  */
13
13
  export declare const SKIP_CI_LABEL = "skip-ci";
14
14
  /**
15
- * The label that says a pull request has been reviewed and is waiting its
16
- * turn. It is the whole of `unblock-prs`'s scope rule: a pull request without
17
- * it is passed over in silence, and one with it is rebased, released from
18
- * `skip-ci` and watched when its turn comes.
15
+ * The label that says a pull request has been reviewed and is waiting its turn.
16
+ * It is the whole of `unblock-prs`'s scope rule: a pull request without it is
17
+ * passed over in silence, and one with it is rebased, released from `skip-ci`
18
+ * and watched when its turn comes.
19
19
  */
20
20
  export declare const MERGE_QUEUED_LABEL = "merge-queued";
21
21
  /**
22
22
  * The label a pull request carries to say the next release must contain it:
23
23
  * while it is open, the version pull request is not picked.
24
24
  *
25
- * It exists because the version pull request is the one pull request whose
26
- * body cannot declare a `Merge-After:` — `changesets/action` overwrites the
27
- * title and body of it on every push to the base — so the ordering is
28
- * declared from the other side, by the pull request the release is waiting
29
- * for. A label rather than a trailer for the same reason `merge-queued` is
30
- * one: this repository is public, and a label needs write access while a
31
- * comment does not.
25
+ * It exists because the version pull request is the one pull request whose body
26
+ * cannot declare a `Merge-After:` — `changesets/action` overwrites the title
27
+ * and body of it on every push to the base — so the ordering is declared from
28
+ * the other side, by the pull request the release is waiting for. A label
29
+ * rather than a trailer for the same reason `merge-queued` is one: this
30
+ * repository is public, and a label needs write access while a comment does
31
+ * not.
32
32
  *
33
- * Nothing ever takes it off. The constraint is "open", so it ends when the
34
- * pull request merges or is closed, and there is no state left behind to
35
- * clean up.
33
+ * Nothing ever takes it off. The constraint is "open", so it ends when the pull
34
+ * request merges or is closed, and there is no state left behind to clean up.
36
35
  */
37
36
  export declare const BLOCKS_RELEASE_LABEL = "blocks-release";
38
37
  /**
39
38
  * The label that asks `unblock-prs` to keep a pull request on the tip of the
40
39
  * default branch while it waits, so that its diff stays readable for review.
41
40
  * It is honoured only together with `skip-ci`, under which the push runs no
42
- * checks, and only when the queue has nothing to do. `open-pr` puts it on
43
- * every layer of a stack: one above the bottom is carried along by the layer
44
- * below, and needs the label of its own once that layer merges and it is
45
- * moved onto the default branch.
41
+ * checks, and only when the queue has nothing to do. `open-pr` puts it on every
42
+ * layer of a stack: one above the bottom is carried along by the layer below,
43
+ * and needs the label of its own once that layer merges and it is moved onto
44
+ * the default branch.
46
45
  */
47
46
  export declare const AUTO_REBASE_LABEL = "auto-rebase";
48
47
  /**
49
48
  * The labels that move a pull request within `unblock-prs`'s pick order:
50
- * among the ones it may pick, those labelled `priority:high` go first and
51
- * those labelled `priority:low` last, the version pull request included.
52
- * They decide nothing else — what `Merge-After:`, a stack or
53
- * `blocks-release` holds back stays held, and a pull request already in
54
- * flight is watched whatever it carries. One carrying both counts as
55
- * neither. {@link PRIORITY_MID_LABEL} is not read there: it is the same as
56
- * carrying neither.
49
+ * among the ones it may pick, those labelled `priority:high` go first and those
50
+ * labelled `priority:low` last, the version pull request included.
51
+ * They decide nothing else — what `Merge-After:`, a stack or `blocks-release`
52
+ * holds back stays held, and a pull request already in flight is watched
53
+ * whatever it carries. One carrying both counts as neither. They are pull
54
+ * request labels: an issue's is a tier (`issue-priority.mts`).
55
+ * {@link PRIORITY_MID_LABEL} is not read there: it is the same as carrying
56
+ * neither.
57
57
  */
58
58
  export declare const PRIORITY_HIGH_LABEL = "priority:high";
59
59
  export declare const PRIORITY_LOW_LABEL = "priority:low";
@@ -64,17 +64,18 @@ export declare const PRIORITY_LOW_LABEL = "priority:low";
64
64
  export declare const PRIORITY_MID_LABEL = "priority:mid";
65
65
  /**
66
66
  * The label that says the author is holding a pull request back for now.
67
- * Also on GitHub, and read only by the Pull Requests Manager page, whose
68
- * merge order counts it and can hide what carries it. It asks nothing of
67
+ * Also on GitHub, and read only by the Pull Requests Manager page, whose merge
68
+ * order counts it and can hide what carries it. It asks nothing of
69
69
  * `unblock-prs`: what is held is simply not labelled `merge-queued`.
70
70
  */
71
71
  export declare const PENDING_LABEL = "pending";
72
72
  /**
73
73
  * The label that says someone has started an issue, before there is a pull
74
- * request to say so. `start-issue` puts it on, and refuses an issue that
75
- * already carries it, so that two sessions do not pick up the same one; the
76
- * Pull Requests Manager page and `pr-report` show a startable issue carrying
77
- * it as in progress, as they show one an open pull request closes
74
+ * request to say so. `start-issue` puts it on, with a claim comment saying who
75
+ * (`issue-claim.mts`), and refuses an issue someone else claimed or that
76
+ * carries it unclaimed, so that two sessions do not pick up the same one; the
77
+ * Pull Requests Manager page and `pr-report` show a startable issue carrying it
78
+ * as in progress, as they show one an open pull request closes
78
79
  * (`start-after.mts`'s `progressOf`). Nothing takes it off when the work
79
80
  * merges: the issue closes, and the label with it stops mattering.
80
81
  */
@@ -82,9 +83,9 @@ export declare const IN_PROGRESS_LABEL = "in-progress";
82
83
  /**
83
84
  * The label that says someone means to start an issue next. It holds nothing
84
85
  * back — `start-issue` takes it off as it puts {@link IN_PROGRESS_LABEL} on —
85
- * and only tells whoever is choosing what to start that this one is spoken
86
- * for; the page and `pr-report` show a startable issue carrying it as
87
- * planned.
86
+ * and only tells whoever is choosing what to start that this one is spoken for;
87
+ * `start-issue --plan` puts it on with a claim comment saying by whom;
88
+ * the page and `pr-report` show a startable issue carrying it as planned.
88
89
  */
89
90
  export declare const PLANNED_LABEL = "planned";
90
91
  //# sourceMappingURL=labels.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"labels.d.mts","sourceRoot":"","sources":["../src/labels.mts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,aAAa,YAAY,CAAC;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAEjD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AAErD;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAE/C;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AAEnD,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAEjD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,YAAY,CAAC;AAEvC;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,YAAY,CAAC"}
1
+ {"version":3,"file":"labels.d.mts","sourceRoot":"","sources":["../src/labels.mts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,aAAa,YAAY,CAAC;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAEjD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AAErD;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AAEnD,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAEjD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,YAAY,CAAC;AAEvC;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,YAAY,CAAC"}
package/dist/labels.mjs CHANGED
@@ -33,7 +33,6 @@ export const MERGE_QUEUED_LABEL = 'merge-queued';
33
33
 
34
34
 
35
35
 
36
-
37
36
  export const BLOCKS_RELEASE_LABEL = 'blocks-release';
38
37
 
39
38
 
@@ -55,6 +54,7 @@ export const AUTO_REBASE_LABEL = 'auto-rebase';
55
54
 
56
55
 
57
56
 
57
+
58
58
  export const PRIORITY_HIGH_LABEL = 'priority:high';
59
59
  export const PRIORITY_LOW_LABEL = 'priority:low';
60
60
 
@@ -78,6 +78,7 @@ export const PENDING_LABEL = 'pending';
78
78
 
79
79
 
80
80
 
81
+
81
82
  export const IN_PROGRESS_LABEL = 'in-progress';
82
83
 
83
84
 
@@ -1 +1 @@
1
- {"version":3,"file":"labels.mjs","sourceRoot":"","sources":["../src/labels.mts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAEjD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAE/C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAEnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC;AAEvC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"labels.mjs","sourceRoot":"","sources":["../src/labels.mts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAEjD;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAEnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC;AAEvC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC"}
@@ -8,42 +8,48 @@
8
8
  *
9
9
  * Duplicates are dropped and the order within the declaration is not kept:
10
10
  * what is being read is a set of things that have to have happened, not a
11
- * sequence. A number that names no pull request, or one that is already
12
- * closed, simply never appears in the open list and so constrains nothing.
11
+ * sequence. A number that names no pull request, or one that is already closed,
12
+ * simply never appears in the open list and so constrains nothing.
13
13
  */
14
14
  export declare const parseMergeAfter: (body: string) => readonly number[];
15
15
  /**
16
- * The numbers an issue body declares it waits for before it is started,
17
- * read exactly as {@link parseMergeAfter} reads its trailer
16
+ * The numbers an issue body declares it waits for before it is started, read
17
+ * exactly as {@link parseMergeAfter} reads its trailer
18
18
  * (`docs/issue-start-after.md`).
19
19
  */
20
20
  export declare const parseStartAfter: (body: string) => readonly number[];
21
21
  /**
22
- * The body with the contents of its fenced code blocks blanked out, line
23
- * count preserved.
22
+ * The body with the contents of its fenced code blocks blanked out, line count
23
+ * preserved.
24
24
  *
25
25
  * A declaration and an example of one are the same text, and the pull request
26
26
  * that introduced this feature had to describe it: written in a fence, the
27
- * example would have been read as a constraint on the pull request
28
- * documenting it. A fence is how every document here already says "this is a
29
- * sample, not the thing itself", so it is the line to draw.
27
+ * example would have been read as a constraint on the pull request documenting
28
+ * it. A fence is how every document here already says "this is a sample, not
29
+ * the thing itself", so it is the line to draw.
30
30
  *
31
- * Exported because `pr-report` reads the closing keywords (`Closes #12`) out
32
- * of the same bodies and has to draw the line in the same place — a document
31
+ * Exported because `pr-report` reads the closing keywords (`Closes #12`) out of
32
+ * the same bodies and has to draw the line in the same place — a document
33
33
  * showing what a declaration looks like must not become one.
34
34
  */
35
35
  export declare const outsideCodeFences: (body: string) => string;
36
36
  /**
37
- * The `Merge-After` cycles, one entry per cycle, each listing the numbers in
38
- * the order the edges run and rotated to start at its lowest number so that
39
- * the same cycle is always reported the same way.
37
+ * The `Merge-After` cycles, each listing the numbers in the order the edges run
38
+ * and rotated to start at its lowest number so that the same cycle is always
39
+ * reported the same way.
40
+ *
41
+ * Every number that lies on any cycle appears in at least one entry — callers
42
+ * take `cycles.flat()` as the set of numbers on a cycle. Each entry is the
43
+ * shortest cycle through the first number, in key order, that no earlier entry
44
+ * covers, so a component with several loops yields one entry per loop needed to
45
+ * cover it rather than every loop it holds.
40
46
  *
41
47
  * A cycle is not a state anything here can resolve: every pull request on one
42
48
  * waits for another that waits, in the end, for it. Naming it is the whole of
43
49
  * what can be done about it — without this the members would each report
44
50
  * "waiting on #N" for as long as the loop runs, with nothing saying why that
45
- * never changes. A pull request that declares itself is a cycle of one, and
46
- * is found by the same walk.
51
+ * never changes. A pull request that declares itself is a cycle of one, and is
52
+ * found by the same search.
47
53
  */
48
54
  export declare const findMergeAfterCycles: (dependencies: ReadonlyMap<number, readonly number[]>) => readonly (readonly number[])[];
49
55
  //# sourceMappingURL=merge-after.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"merge-after.d.mts","sourceRoot":"","sources":["../src/merge-after.mts"],"names":[],"mappings":"AAAA;;;;GAIG;AAsBH;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,SAAU,MAAM,KAAG,SAAS,MAAM,EACvB,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,eAAe,SAAU,MAAM,KAAG,SAAS,MAAM,EACvB,CAAC;AAExC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,SAAU,MAAM,KAAG,MAehD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,iBACjB,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,KACnD,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAoC9B,CAAC"}
1
+ {"version":3,"file":"merge-after.d.mts","sourceRoot":"","sources":["../src/merge-after.mts"],"names":[],"mappings":"AAAA;;;;GAIG;AAwBH;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,SAAU,MAAM,KAAG,SAAS,MAAM,EACvB,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,eAAe,SAAU,MAAM,KAAG,SAAS,MAAM,EACvB,CAAC;AAExC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,SAAU,MAAM,KAAG,MA2ChD,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,iBACjB,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,KACnD,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EA4B9B,CAAC"}