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.
Files changed (331) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +125 -2
  3. package/dist/claim-pr/claim-pr.d.mts +45 -0
  4. package/dist/claim-pr/claim-pr.d.mts.map +1 -0
  5. package/dist/claim-pr/claim-pr.mjs +217 -0
  6. package/dist/claim-pr/claim-pr.mjs.map +1 -0
  7. package/dist/claim-pr/index.d.mts +2 -0
  8. package/dist/claim-pr/index.d.mts.map +1 -0
  9. package/dist/claim-pr/index.mjs +2 -0
  10. package/dist/claim-pr/index.mjs.map +1 -0
  11. package/dist/cmd/claim-pr.d.mts +3 -0
  12. package/dist/cmd/claim-pr.d.mts.map +1 -0
  13. package/dist/cmd/claim-pr.mjs +20 -0
  14. package/dist/cmd/claim-pr.mjs.map +1 -0
  15. package/dist/cmd/open-pr.d.mts +3 -0
  16. package/dist/cmd/open-pr.d.mts.map +1 -0
  17. package/dist/cmd/open-pr.mjs +20 -0
  18. package/dist/cmd/open-pr.mjs.map +1 -0
  19. package/dist/cmd/pr-report.d.mts +3 -0
  20. package/dist/cmd/pr-report.d.mts.map +1 -0
  21. package/dist/cmd/pr-report.mjs +20 -0
  22. package/dist/cmd/pr-report.mjs.map +1 -0
  23. package/dist/cmd/push-fixed-pr.d.mts +3 -0
  24. package/dist/cmd/push-fixed-pr.d.mts.map +1 -0
  25. package/dist/cmd/push-fixed-pr.mjs +20 -0
  26. package/dist/cmd/push-fixed-pr.mjs.map +1 -0
  27. package/dist/cmd/report-unowned-prs.d.mts +3 -0
  28. package/dist/cmd/report-unowned-prs.d.mts.map +1 -0
  29. package/dist/cmd/report-unowned-prs.mjs +20 -0
  30. package/dist/cmd/report-unowned-prs.mjs.map +1 -0
  31. package/dist/cmd/unblock-prs.d.mts +3 -0
  32. package/dist/cmd/unblock-prs.d.mts.map +1 -0
  33. package/dist/cmd/unblock-prs.mjs +19 -0
  34. package/dist/cmd/unblock-prs.mjs.map +1 -0
  35. package/dist/entry-point.d.mts +3 -0
  36. package/dist/entry-point.d.mts.map +1 -0
  37. package/dist/entry-point.mjs +3 -0
  38. package/dist/entry-point.mjs.map +1 -0
  39. package/dist/lib/cli-args.d.mts +27 -0
  40. package/dist/lib/cli-args.d.mts.map +1 -0
  41. package/dist/lib/cli-args.mjs +55 -0
  42. package/dist/lib/cli-args.mjs.map +1 -0
  43. package/dist/lib/github-api.d.mts +153 -0
  44. package/dist/lib/github-api.d.mts.map +1 -0
  45. package/dist/lib/github-api.mjs +291 -0
  46. package/dist/lib/github-api.mjs.map +1 -0
  47. package/dist/lib/index.d.mts +7 -0
  48. package/dist/lib/index.d.mts.map +1 -0
  49. package/dist/lib/index.mjs +7 -0
  50. package/dist/lib/index.mjs.map +1 -0
  51. package/dist/lib/json.d.mts +12 -0
  52. package/dist/lib/json.d.mts.map +1 -0
  53. package/dist/lib/json.mjs +28 -0
  54. package/dist/lib/json.mjs.map +1 -0
  55. package/dist/lib/log.d.mts +10 -0
  56. package/dist/lib/log.d.mts.map +1 -0
  57. package/dist/lib/log.mjs +13 -0
  58. package/dist/lib/log.mjs.map +1 -0
  59. package/dist/lib/shell.d.mts +18 -0
  60. package/dist/lib/shell.d.mts.map +1 -0
  61. package/dist/lib/shell.mjs +42 -0
  62. package/dist/lib/shell.mjs.map +1 -0
  63. package/dist/lib/time.d.mts +17 -0
  64. package/dist/lib/time.d.mts.map +1 -0
  65. package/dist/lib/time.mjs +35 -0
  66. package/dist/lib/time.mjs.map +1 -0
  67. package/dist/open-pr/github.d.mts +72 -0
  68. package/dist/open-pr/github.d.mts.map +1 -0
  69. package/dist/open-pr/github.mjs +249 -0
  70. package/dist/open-pr/github.mjs.map +1 -0
  71. package/dist/open-pr/index.d.mts +6 -0
  72. package/dist/open-pr/index.d.mts.map +1 -0
  73. package/dist/open-pr/index.mjs +6 -0
  74. package/dist/open-pr/index.mjs.map +1 -0
  75. package/dist/open-pr/main.d.mts +36 -0
  76. package/dist/open-pr/main.d.mts.map +1 -0
  77. package/dist/open-pr/main.mjs +204 -0
  78. package/dist/open-pr/main.mjs.map +1 -0
  79. package/dist/open-pr/options.d.mts +20 -0
  80. package/dist/open-pr/options.d.mts.map +1 -0
  81. package/dist/open-pr/options.mjs +66 -0
  82. package/dist/open-pr/options.mjs.map +1 -0
  83. package/dist/open-pr/steps.d.mts +23 -0
  84. package/dist/open-pr/steps.d.mts.map +1 -0
  85. package/dist/open-pr/steps.mjs +38 -0
  86. package/dist/open-pr/steps.mjs.map +1 -0
  87. package/dist/open-pr/types.d.mts +179 -0
  88. package/dist/open-pr/types.d.mts.map +1 -0
  89. package/dist/open-pr/types.mjs +20 -0
  90. package/dist/open-pr/types.mjs.map +1 -0
  91. package/dist/pr-report/github.d.mts +59 -0
  92. package/dist/pr-report/github.d.mts.map +1 -0
  93. package/dist/pr-report/github.mjs +561 -0
  94. package/dist/pr-report/github.mjs.map +1 -0
  95. package/dist/pr-report/index.d.mts +8 -0
  96. package/dist/pr-report/index.d.mts.map +1 -0
  97. package/dist/pr-report/index.mjs +8 -0
  98. package/dist/pr-report/index.mjs.map +1 -0
  99. package/dist/pr-report/linked-issues.d.mts +15 -0
  100. package/dist/pr-report/linked-issues.d.mts.map +1 -0
  101. package/dist/pr-report/linked-issues.mjs +39 -0
  102. package/dist/pr-report/linked-issues.mjs.map +1 -0
  103. package/dist/pr-report/main.d.mts +42 -0
  104. package/dist/pr-report/main.d.mts.map +1 -0
  105. package/dist/pr-report/main.mjs +163 -0
  106. package/dist/pr-report/main.mjs.map +1 -0
  107. package/dist/pr-report/options.d.mts +36 -0
  108. package/dist/pr-report/options.d.mts.map +1 -0
  109. package/dist/pr-report/options.mjs +90 -0
  110. package/dist/pr-report/options.mjs.map +1 -0
  111. package/dist/pr-report/queue.d.mts +28 -0
  112. package/dist/pr-report/queue.d.mts.map +1 -0
  113. package/dist/pr-report/queue.mjs +74 -0
  114. package/dist/pr-report/queue.mjs.map +1 -0
  115. package/dist/pr-report/render.d.mts +14 -0
  116. package/dist/pr-report/render.d.mts.map +1 -0
  117. package/dist/pr-report/render.mjs +318 -0
  118. package/dist/pr-report/render.mjs.map +1 -0
  119. package/dist/pr-report/repo-settings.d.mts +12 -0
  120. package/dist/pr-report/repo-settings.d.mts.map +1 -0
  121. package/dist/pr-report/repo-settings.mjs +22 -0
  122. package/dist/pr-report/repo-settings.mjs.map +1 -0
  123. package/dist/push-fixed-pr/index.d.mts +2 -0
  124. package/dist/push-fixed-pr/index.d.mts.map +1 -0
  125. package/dist/push-fixed-pr/index.mjs +2 -0
  126. package/dist/push-fixed-pr/index.mjs.map +1 -0
  127. package/dist/push-fixed-pr/push-fixed-pr.d.mts +54 -0
  128. package/dist/push-fixed-pr/push-fixed-pr.d.mts.map +1 -0
  129. package/dist/push-fixed-pr/push-fixed-pr.mjs +172 -0
  130. package/dist/push-fixed-pr/push-fixed-pr.mjs.map +1 -0
  131. package/dist/report-unowned-prs/index.d.mts +2 -0
  132. package/dist/report-unowned-prs/index.d.mts.map +1 -0
  133. package/dist/report-unowned-prs/index.mjs +2 -0
  134. package/dist/report-unowned-prs/index.mjs.map +1 -0
  135. package/dist/report-unowned-prs/report-unowned-prs.d.mts +49 -0
  136. package/dist/report-unowned-prs/report-unowned-prs.d.mts.map +1 -0
  137. package/dist/report-unowned-prs/report-unowned-prs.mjs +127 -0
  138. package/dist/report-unowned-prs/report-unowned-prs.mjs.map +1 -0
  139. package/dist/tsconfig.json +1 -0
  140. package/dist/unblock-prs/auto-fix.d.mts +45 -0
  141. package/dist/unblock-prs/auto-fix.d.mts.map +1 -0
  142. package/dist/unblock-prs/auto-fix.mjs +207 -0
  143. package/dist/unblock-prs/auto-fix.mjs.map +1 -0
  144. package/dist/unblock-prs/checks.d.mts +307 -0
  145. package/dist/unblock-prs/checks.d.mts.map +1 -0
  146. package/dist/unblock-prs/checks.mjs +372 -0
  147. package/dist/unblock-prs/checks.mjs.map +1 -0
  148. package/dist/unblock-prs/claims.d.mts +21 -0
  149. package/dist/unblock-prs/claims.d.mts.map +1 -0
  150. package/dist/unblock-prs/claims.mjs +23 -0
  151. package/dist/unblock-prs/claims.mjs.map +1 -0
  152. package/dist/unblock-prs/config.d.mts +487 -0
  153. package/dist/unblock-prs/config.d.mts.map +1 -0
  154. package/dist/unblock-prs/config.mjs +119 -0
  155. package/dist/unblock-prs/config.mjs.map +1 -0
  156. package/dist/unblock-prs/constants.d.mts +28 -0
  157. package/dist/unblock-prs/constants.d.mts.map +1 -0
  158. package/dist/unblock-prs/constants.mjs +28 -0
  159. package/dist/unblock-prs/constants.mjs.map +1 -0
  160. package/dist/unblock-prs/demotions.d.mts +42 -0
  161. package/dist/unblock-prs/demotions.d.mts.map +1 -0
  162. package/dist/unblock-prs/demotions.mjs +50 -0
  163. package/dist/unblock-prs/demotions.mjs.map +1 -0
  164. package/dist/unblock-prs/github.d.mts +739 -0
  165. package/dist/unblock-prs/github.d.mts.map +1 -0
  166. package/dist/unblock-prs/github.mjs +626 -0
  167. package/dist/unblock-prs/github.mjs.map +1 -0
  168. package/dist/unblock-prs/index.d.mts +25 -0
  169. package/dist/unblock-prs/index.d.mts.map +1 -0
  170. package/dist/unblock-prs/index.mjs +25 -0
  171. package/dist/unblock-prs/index.mjs.map +1 -0
  172. package/dist/unblock-prs/labels.d.mts +49 -0
  173. package/dist/unblock-prs/labels.d.mts.map +1 -0
  174. package/dist/unblock-prs/labels.mjs +49 -0
  175. package/dist/unblock-prs/labels.mjs.map +1 -0
  176. package/dist/unblock-prs/main.d.mts +179 -0
  177. package/dist/unblock-prs/main.d.mts.map +1 -0
  178. package/dist/unblock-prs/main.mjs +640 -0
  179. package/dist/unblock-prs/main.mjs.map +1 -0
  180. package/dist/unblock-prs/merge-after.d.mts +46 -0
  181. package/dist/unblock-prs/merge-after.d.mts.map +1 -0
  182. package/dist/unblock-prs/merge-after.mjs +65 -0
  183. package/dist/unblock-prs/merge-after.mjs.map +1 -0
  184. package/dist/unblock-prs/options.d.mts +35 -0
  185. package/dist/unblock-prs/options.d.mts.map +1 -0
  186. package/dist/unblock-prs/options.mjs +88 -0
  187. package/dist/unblock-prs/options.mjs.map +1 -0
  188. package/dist/unblock-prs/owner.d.mts +32 -0
  189. package/dist/unblock-prs/owner.d.mts.map +1 -0
  190. package/dist/unblock-prs/owner.mjs +63 -0
  191. package/dist/unblock-prs/owner.mjs.map +1 -0
  192. package/dist/unblock-prs/quiet.d.mts +21 -0
  193. package/dist/unblock-prs/quiet.d.mts.map +1 -0
  194. package/dist/unblock-prs/quiet.mjs +42 -0
  195. package/dist/unblock-prs/quiet.mjs.map +1 -0
  196. package/dist/unblock-prs/rebase.d.mts +120 -0
  197. package/dist/unblock-prs/rebase.d.mts.map +1 -0
  198. package/dist/unblock-prs/rebase.mjs +576 -0
  199. package/dist/unblock-prs/rebase.mjs.map +1 -0
  200. package/dist/unblock-prs/release.d.mts +62 -0
  201. package/dist/unblock-prs/release.d.mts.map +1 -0
  202. package/dist/unblock-prs/release.mjs +94 -0
  203. package/dist/unblock-prs/release.mjs.map +1 -0
  204. package/dist/unblock-prs/set-aside-comment.d.mts +20 -0
  205. package/dist/unblock-prs/set-aside-comment.d.mts.map +1 -0
  206. package/dist/unblock-prs/set-aside-comment.mjs +93 -0
  207. package/dist/unblock-prs/set-aside-comment.mjs.map +1 -0
  208. package/dist/unblock-prs/set-aside-detail.d.mts +41 -0
  209. package/dist/unblock-prs/set-aside-detail.d.mts.map +1 -0
  210. package/dist/unblock-prs/set-aside-detail.mjs +56 -0
  211. package/dist/unblock-prs/set-aside-detail.mjs.map +1 -0
  212. package/dist/unblock-prs/skips.d.mts +85 -0
  213. package/dist/unblock-prs/skips.d.mts.map +1 -0
  214. package/dist/unblock-prs/skips.mjs +141 -0
  215. package/dist/unblock-prs/skips.mjs.map +1 -0
  216. package/dist/unblock-prs/stack.d.mts +98 -0
  217. package/dist/unblock-prs/stack.d.mts.map +1 -0
  218. package/dist/unblock-prs/stack.mjs +141 -0
  219. package/dist/unblock-prs/stack.mjs.map +1 -0
  220. package/dist/unblock-prs/triage.d.mts +28 -0
  221. package/dist/unblock-prs/triage.d.mts.map +1 -0
  222. package/dist/unblock-prs/triage.mjs +396 -0
  223. package/dist/unblock-prs/triage.mjs.map +1 -0
  224. package/dist/unblock-prs/types.d.mts +793 -0
  225. package/dist/unblock-prs/types.d.mts.map +1 -0
  226. package/dist/unblock-prs/types.mjs +26 -0
  227. package/dist/unblock-prs/types.mjs.map +1 -0
  228. package/dist/unblock-prs/util.d.mts +23 -0
  229. package/dist/unblock-prs/util.d.mts.map +1 -0
  230. package/dist/unblock-prs/util.mjs +60 -0
  231. package/dist/unblock-prs/util.mjs.map +1 -0
  232. package/dist/unblock-prs/version-pr.d.mts +57 -0
  233. package/dist/unblock-prs/version-pr.d.mts.map +1 -0
  234. package/dist/unblock-prs/version-pr.mjs +79 -0
  235. package/dist/unblock-prs/version-pr.mjs.map +1 -0
  236. package/dist/unblock-prs/watch.d.mts +17 -0
  237. package/dist/unblock-prs/watch.d.mts.map +1 -0
  238. package/dist/unblock-prs/watch.mjs +128 -0
  239. package/dist/unblock-prs/watch.mjs.map +1 -0
  240. package/package.json +118 -3
  241. package/src/claim-pr/claim-pr.mts +380 -0
  242. package/src/claim-pr/claim-pr.test.mts +176 -0
  243. package/src/claim-pr/index.mts +1 -0
  244. package/src/cmd/claim-pr.mts +32 -0
  245. package/src/cmd/open-pr.mts +28 -0
  246. package/src/cmd/pr-report.mts +28 -0
  247. package/src/cmd/push-fixed-pr.mts +36 -0
  248. package/src/cmd/report-unowned-prs.mts +37 -0
  249. package/src/cmd/unblock-prs.mts +24 -0
  250. package/src/entry-point.mts +3 -0
  251. package/src/lib/cli-args.mts +86 -0
  252. package/src/lib/cli-args.test.mts +92 -0
  253. package/src/lib/github-api.mts +463 -0
  254. package/src/lib/github-api.test.mts +40 -0
  255. package/src/lib/index.mts +6 -0
  256. package/src/lib/json.mts +43 -0
  257. package/src/lib/json.test.mts +34 -0
  258. package/src/lib/log.mts +19 -0
  259. package/src/lib/log.test.mts +45 -0
  260. package/src/lib/shell.mts +52 -0
  261. package/src/lib/time.mts +49 -0
  262. package/src/open-pr/README.md +237 -0
  263. package/src/open-pr/github.mts +444 -0
  264. package/src/open-pr/index.mts +5 -0
  265. package/src/open-pr/main.mts +327 -0
  266. package/src/open-pr/options.mts +101 -0
  267. package/src/open-pr/options.test.mts +67 -0
  268. package/src/open-pr/steps.mts +57 -0
  269. package/src/open-pr/steps.test.mts +59 -0
  270. package/src/open-pr/types.mts +42 -0
  271. package/src/pr-report/README.md +244 -0
  272. package/src/pr-report/github.mts +911 -0
  273. package/src/pr-report/index.mts +7 -0
  274. package/src/pr-report/linked-issues.mts +51 -0
  275. package/src/pr-report/linked-issues.test.mts +65 -0
  276. package/src/pr-report/main.mts +257 -0
  277. package/src/pr-report/options.mts +140 -0
  278. package/src/pr-report/queue.mts +125 -0
  279. package/src/pr-report/render.mts +428 -0
  280. package/src/pr-report/render.test.mts +379 -0
  281. package/src/pr-report/repo-settings.mts +34 -0
  282. package/src/push-fixed-pr/index.mts +1 -0
  283. package/src/push-fixed-pr/push-fixed-pr.mts +276 -0
  284. package/src/push-fixed-pr/push-fixed-pr.test.mts +228 -0
  285. package/src/report-unowned-prs/index.mts +1 -0
  286. package/src/report-unowned-prs/report-unowned-prs.mts +190 -0
  287. package/src/report-unowned-prs/report-unowned-prs.test.mts +87 -0
  288. package/src/unblock-prs/README.md +1616 -0
  289. package/src/unblock-prs/auto-fix.mts +334 -0
  290. package/src/unblock-prs/auto-fix.test.mts +159 -0
  291. package/src/unblock-prs/checks.mts +538 -0
  292. package/src/unblock-prs/checks.test.mts +507 -0
  293. package/src/unblock-prs/claims.mts +33 -0
  294. package/src/unblock-prs/claims.test.mts +64 -0
  295. package/src/unblock-prs/config.mts +187 -0
  296. package/src/unblock-prs/config.schema.json +71 -0
  297. package/src/unblock-prs/config.test.mts +139 -0
  298. package/src/unblock-prs/constants.mts +33 -0
  299. package/src/unblock-prs/demotions.mts +73 -0
  300. package/src/unblock-prs/demotions.test.mts +100 -0
  301. package/src/unblock-prs/github.mts +1042 -0
  302. package/src/unblock-prs/github.test.mts +84 -0
  303. package/src/unblock-prs/index.mts +24 -0
  304. package/src/unblock-prs/labels.mts +70 -0
  305. package/src/unblock-prs/main.mts +1051 -0
  306. package/src/unblock-prs/merge-after.mts +117 -0
  307. package/src/unblock-prs/merge-after.test.mts +120 -0
  308. package/src/unblock-prs/options.mts +157 -0
  309. package/src/unblock-prs/owner.mts +91 -0
  310. package/src/unblock-prs/owner.test.mts +114 -0
  311. package/src/unblock-prs/quiet.mts +62 -0
  312. package/src/unblock-prs/quiet.test.mts +175 -0
  313. package/src/unblock-prs/rebase.mts +962 -0
  314. package/src/unblock-prs/release.mts +149 -0
  315. package/src/unblock-prs/release.test.mts +209 -0
  316. package/src/unblock-prs/set-aside-comment.mts +143 -0
  317. package/src/unblock-prs/set-aside-comment.test.mts +148 -0
  318. package/src/unblock-prs/set-aside-detail.mts +82 -0
  319. package/src/unblock-prs/set-aside-detail.test.mts +131 -0
  320. package/src/unblock-prs/skips.mts +215 -0
  321. package/src/unblock-prs/skips.test.mts +280 -0
  322. package/src/unblock-prs/stack.mts +220 -0
  323. package/src/unblock-prs/stack.test.mts +449 -0
  324. package/src/unblock-prs/triage.mts +669 -0
  325. package/src/unblock-prs/triage.test.mts +100 -0
  326. package/src/unblock-prs/types.mts +358 -0
  327. package/src/unblock-prs/util.mts +78 -0
  328. package/src/unblock-prs/util.test.mts +26 -0
  329. package/src/unblock-prs/version-pr.mts +112 -0
  330. package/src/unblock-prs/version-pr.test.mts +78 -0
  331. package/src/unblock-prs/watch.mts +219 -0
@@ -0,0 +1,739 @@
1
+ /**
2
+ * Everything that reads or writes GitHub or `git`, and nothing that decides.
3
+ * The API client and the `git` runner are shared with the other commands
4
+ * (`tools/scripts/lib/`).
5
+ */
6
+ import { type CheckRunReport, type Claim, type NativeStackEntry, type ReviewState, type RulesetRequirements } from 'pr-report-core';
7
+ import { Result } from 'ts-data-forge';
8
+ import * as t from 'ts-fortress';
9
+ import { type ApiContext } from '../lib/index.mjs';
10
+ import { type BaseChange, type IssueOrder, type OwnSetAsideComment, type PullRequest } from './types.mjs';
11
+ /**
12
+ * The credential and the repository every call here takes, and the branch
13
+ * the queue lands on. `repoOption` is `--repo owner/name`, when given.
14
+ */
15
+ export declare const checkPreflight: (repoOption: string | undefined) => Promise<Result<Readonly<{
16
+ api: ApiContext;
17
+ defaultBranch: string;
18
+ }>, string>>;
19
+ /**
20
+ * The open pull requests, newest first, at most {@link OPEN_LIMIT} of them
21
+ * as `gh pr list` read. GraphQL, because `mergeStateStatus` is not in REST.
22
+ */
23
+ export declare const listPullRequests: (api: ApiContext) => Promise<Result<readonly PullRequest[], string>>;
24
+ export declare const viewPullRequest: (api: ApiContext, prNumber: number) => Promise<Result<PullRequest, string>>;
25
+ /**
26
+ * `REVIEW_REQUIRED`, `CHANGES_REQUESTED`, `APPROVED`, or empty when the
27
+ * rules ask for no review. Read only when a green pull request will not
28
+ * merge, to say what holds it.
29
+ */
30
+ export declare const viewReviewDecision: (api: ApiContext, prNumber: number) => Promise<Result<string, string>>;
31
+ /**
32
+ * A pull request as GraphQL answers it, in the shape every module here reads
33
+ * ({@link PullRequestSchema}): only the labels differ, a connection there and
34
+ * a list here.
35
+ */
36
+ export declare const pullRequestOfNode: (node: t.TypeOf<typeof PullRequestNodeSchema>) => PullRequest;
37
+ declare const PullRequestNodeSchema: Readonly<{
38
+ typeName: string;
39
+ defaultValue: Readonly<{
40
+ autoMergeRequest: unknown;
41
+ baseRefName: string;
42
+ body: string;
43
+ headRefName: string;
44
+ headRefOid: string;
45
+ id: string;
46
+ isCrossRepository: boolean;
47
+ isDraft: boolean;
48
+ labels: Readonly<{
49
+ nodes: readonly Readonly<{
50
+ name: string;
51
+ }>[];
52
+ }>;
53
+ mergeStateStatus: string;
54
+ number: number;
55
+ state: string;
56
+ title: string;
57
+ }>;
58
+ is: (a: unknown) => a is Readonly<{
59
+ autoMergeRequest: unknown;
60
+ baseRefName: string;
61
+ body: string;
62
+ headRefName: string;
63
+ headRefOid: string;
64
+ id: string;
65
+ isCrossRepository: boolean;
66
+ isDraft: boolean;
67
+ labels: Readonly<{
68
+ nodes: readonly Readonly<{
69
+ name: string;
70
+ }>[];
71
+ }>;
72
+ mergeStateStatus: string;
73
+ number: number;
74
+ state: string;
75
+ title: string;
76
+ }>;
77
+ assertIs: (a: unknown) => asserts a is Readonly<{
78
+ autoMergeRequest: unknown;
79
+ baseRefName: string;
80
+ body: string;
81
+ headRefName: string;
82
+ headRefOid: string;
83
+ id: string;
84
+ isCrossRepository: boolean;
85
+ isDraft: boolean;
86
+ labels: Readonly<{
87
+ nodes: readonly Readonly<{
88
+ name: string;
89
+ }>[];
90
+ }>;
91
+ mergeStateStatus: string;
92
+ number: number;
93
+ state: string;
94
+ title: string;
95
+ }>;
96
+ cast: (a: unknown) => Readonly<{
97
+ autoMergeRequest: unknown;
98
+ baseRefName: string;
99
+ body: string;
100
+ headRefName: string;
101
+ headRefOid: string;
102
+ id: string;
103
+ isCrossRepository: boolean;
104
+ isDraft: boolean;
105
+ labels: Readonly<{
106
+ nodes: readonly Readonly<{
107
+ name: string;
108
+ }>[];
109
+ }>;
110
+ mergeStateStatus: string;
111
+ number: number;
112
+ state: string;
113
+ title: string;
114
+ }>;
115
+ fill: (a: unknown) => Readonly<{
116
+ autoMergeRequest: unknown;
117
+ baseRefName: string;
118
+ body: string;
119
+ headRefName: string;
120
+ headRefOid: string;
121
+ id: string;
122
+ isCrossRepository: boolean;
123
+ isDraft: boolean;
124
+ labels: Readonly<{
125
+ nodes: readonly Readonly<{
126
+ name: string;
127
+ }>[];
128
+ }>;
129
+ mergeStateStatus: string;
130
+ number: number;
131
+ state: string;
132
+ title: string;
133
+ }>;
134
+ prune: <B extends Readonly<{
135
+ autoMergeRequest: unknown;
136
+ baseRefName: string;
137
+ body: string;
138
+ headRefName: string;
139
+ headRefOid: string;
140
+ id: string;
141
+ isCrossRepository: boolean;
142
+ isDraft: boolean;
143
+ labels: Readonly<{
144
+ nodes: readonly Readonly<{
145
+ name: string;
146
+ }>[];
147
+ }>;
148
+ mergeStateStatus: string;
149
+ number: number;
150
+ state: string;
151
+ title: string;
152
+ }>>(a: B) => Readonly<{
153
+ autoMergeRequest: unknown;
154
+ baseRefName: string;
155
+ body: string;
156
+ headRefName: string;
157
+ headRefOid: string;
158
+ id: string;
159
+ isCrossRepository: boolean;
160
+ isDraft: boolean;
161
+ labels: Readonly<{
162
+ nodes: readonly Readonly<{
163
+ name: string;
164
+ }>[];
165
+ }>;
166
+ mergeStateStatus: string;
167
+ number: number;
168
+ state: string;
169
+ title: string;
170
+ }>;
171
+ validate: (a: unknown) => Result<Readonly<{
172
+ autoMergeRequest: unknown;
173
+ baseRefName: string;
174
+ body: string;
175
+ headRefName: string;
176
+ headRefOid: string;
177
+ id: string;
178
+ isCrossRepository: boolean;
179
+ isDraft: boolean;
180
+ labels: Readonly<{
181
+ nodes: readonly Readonly<{
182
+ name: string;
183
+ }>[];
184
+ }>;
185
+ mergeStateStatus: string;
186
+ number: number;
187
+ state: string;
188
+ title: string;
189
+ }>, readonly Readonly<{
190
+ path: readonly string[];
191
+ actualValue: unknown;
192
+ expectedType: string;
193
+ typeName: string;
194
+ details?: t.ValidationErrorDetails | undefined;
195
+ }>[]>;
196
+ structure?: t.TypeStructure;
197
+ annotations?: t.TypeAnnotations;
198
+ optional?: true;
199
+ }> & Readonly<{
200
+ shape: {
201
+ readonly number: t.ConstrainedType<number, Readonly<{
202
+ readonly finite: undefined;
203
+ readonly int: undefined;
204
+ readonly safeInteger: undefined;
205
+ readonly nonZero: undefined;
206
+ readonly negative: undefined;
207
+ readonly nonNegative: undefined;
208
+ readonly positive: undefined;
209
+ readonly nonPositive: undefined;
210
+ readonly gt: undefined;
211
+ readonly gte: undefined;
212
+ readonly min: undefined;
213
+ readonly lt: undefined;
214
+ readonly lte: undefined;
215
+ readonly max: undefined;
216
+ readonly multipleOf: undefined;
217
+ readonly step: undefined;
218
+ }>>;
219
+ readonly id: t.ConstrainedType<string, Readonly<{
220
+ readonly nonempty: undefined;
221
+ readonly minLength: undefined;
222
+ readonly maxLength: undefined;
223
+ readonly startsWith: undefined;
224
+ readonly endsWith: undefined;
225
+ readonly includes: undefined;
226
+ readonly uppercase: undefined;
227
+ readonly lowercase: undefined;
228
+ readonly regex: undefined;
229
+ }>>;
230
+ readonly title: t.ConstrainedType<string, Readonly<{
231
+ readonly nonempty: undefined;
232
+ readonly minLength: undefined;
233
+ readonly maxLength: undefined;
234
+ readonly startsWith: undefined;
235
+ readonly endsWith: undefined;
236
+ readonly includes: undefined;
237
+ readonly uppercase: undefined;
238
+ readonly lowercase: undefined;
239
+ readonly regex: undefined;
240
+ }>>;
241
+ readonly body: t.ConstrainedType<string, Readonly<{
242
+ readonly nonempty: undefined;
243
+ readonly minLength: undefined;
244
+ readonly maxLength: undefined;
245
+ readonly startsWith: undefined;
246
+ readonly endsWith: undefined;
247
+ readonly includes: undefined;
248
+ readonly uppercase: undefined;
249
+ readonly lowercase: undefined;
250
+ readonly regex: undefined;
251
+ }>>;
252
+ readonly state: t.ConstrainedType<string, Readonly<{
253
+ readonly nonempty: undefined;
254
+ readonly minLength: undefined;
255
+ readonly maxLength: undefined;
256
+ readonly startsWith: undefined;
257
+ readonly endsWith: undefined;
258
+ readonly includes: undefined;
259
+ readonly uppercase: undefined;
260
+ readonly lowercase: undefined;
261
+ readonly regex: undefined;
262
+ }>>;
263
+ readonly headRefName: t.ConstrainedType<string, Readonly<{
264
+ readonly nonempty: undefined;
265
+ readonly minLength: undefined;
266
+ readonly maxLength: undefined;
267
+ readonly startsWith: undefined;
268
+ readonly endsWith: undefined;
269
+ readonly includes: undefined;
270
+ readonly uppercase: undefined;
271
+ readonly lowercase: undefined;
272
+ readonly regex: undefined;
273
+ }>>;
274
+ readonly headRefOid: t.ConstrainedType<string, Readonly<{
275
+ readonly nonempty: undefined;
276
+ readonly minLength: undefined;
277
+ readonly maxLength: undefined;
278
+ readonly startsWith: undefined;
279
+ readonly endsWith: undefined;
280
+ readonly includes: undefined;
281
+ readonly uppercase: undefined;
282
+ readonly lowercase: undefined;
283
+ readonly regex: undefined;
284
+ }>>;
285
+ readonly baseRefName: t.ConstrainedType<string, Readonly<{
286
+ readonly nonempty: undefined;
287
+ readonly minLength: undefined;
288
+ readonly maxLength: undefined;
289
+ readonly startsWith: undefined;
290
+ readonly endsWith: undefined;
291
+ readonly includes: undefined;
292
+ readonly uppercase: undefined;
293
+ readonly lowercase: undefined;
294
+ readonly regex: undefined;
295
+ }>>;
296
+ readonly isCrossRepository: Readonly<{
297
+ typeName: string;
298
+ defaultValue: boolean;
299
+ is: (a: unknown) => a is boolean;
300
+ assertIs: (a: unknown) => asserts a is boolean;
301
+ cast: (a: unknown) => boolean;
302
+ fill: (a: unknown) => boolean;
303
+ prune: <B extends boolean>(a: B) => boolean;
304
+ validate: (a: unknown) => Result<boolean, readonly Readonly<{
305
+ path: readonly string[];
306
+ actualValue: unknown;
307
+ expectedType: string;
308
+ typeName: string;
309
+ details?: t.ValidationErrorDetails | undefined;
310
+ }>[]>;
311
+ structure?: t.TypeStructure;
312
+ annotations?: t.TypeAnnotations;
313
+ optional?: true;
314
+ }>;
315
+ readonly isDraft: Readonly<{
316
+ typeName: string;
317
+ defaultValue: boolean;
318
+ is: (a: unknown) => a is boolean;
319
+ assertIs: (a: unknown) => asserts a is boolean;
320
+ cast: (a: unknown) => boolean;
321
+ fill: (a: unknown) => boolean;
322
+ prune: <B extends boolean>(a: B) => boolean;
323
+ validate: (a: unknown) => Result<boolean, readonly Readonly<{
324
+ path: readonly string[];
325
+ actualValue: unknown;
326
+ expectedType: string;
327
+ typeName: string;
328
+ details?: t.ValidationErrorDetails | undefined;
329
+ }>[]>;
330
+ structure?: t.TypeStructure;
331
+ annotations?: t.TypeAnnotations;
332
+ optional?: true;
333
+ }>;
334
+ readonly mergeStateStatus: t.ConstrainedType<string, Readonly<{
335
+ readonly nonempty: undefined;
336
+ readonly minLength: undefined;
337
+ readonly maxLength: undefined;
338
+ readonly startsWith: undefined;
339
+ readonly endsWith: undefined;
340
+ readonly includes: undefined;
341
+ readonly uppercase: undefined;
342
+ readonly lowercase: undefined;
343
+ readonly regex: undefined;
344
+ }>>;
345
+ readonly autoMergeRequest: Readonly<{
346
+ typeName: string;
347
+ defaultValue: unknown;
348
+ is: (a: unknown) => a is unknown;
349
+ assertIs: (a: unknown) => asserts a is unknown;
350
+ cast: (a: unknown) => unknown;
351
+ fill: (a: unknown) => unknown;
352
+ prune: <B extends unknown>(a: B) => unknown;
353
+ validate: (a: unknown) => Result<unknown, readonly Readonly<{
354
+ path: readonly string[];
355
+ actualValue: unknown;
356
+ expectedType: string;
357
+ typeName: string;
358
+ details?: t.ValidationErrorDetails | undefined;
359
+ }>[]>;
360
+ structure?: t.TypeStructure;
361
+ annotations?: t.TypeAnnotations;
362
+ optional?: true;
363
+ }>;
364
+ readonly labels: Readonly<{
365
+ typeName: string;
366
+ defaultValue: Readonly<{
367
+ nodes: readonly Readonly<{
368
+ name: string;
369
+ }>[];
370
+ }>;
371
+ is: (a: unknown) => a is Readonly<{
372
+ nodes: readonly Readonly<{
373
+ name: string;
374
+ }>[];
375
+ }>;
376
+ assertIs: (a: unknown) => asserts a is Readonly<{
377
+ nodes: readonly Readonly<{
378
+ name: string;
379
+ }>[];
380
+ }>;
381
+ cast: (a: unknown) => Readonly<{
382
+ nodes: readonly Readonly<{
383
+ name: string;
384
+ }>[];
385
+ }>;
386
+ fill: (a: unknown) => Readonly<{
387
+ nodes: readonly Readonly<{
388
+ name: string;
389
+ }>[];
390
+ }>;
391
+ prune: <B extends Readonly<{
392
+ nodes: readonly Readonly<{
393
+ name: string;
394
+ }>[];
395
+ }>>(a: B) => Readonly<{
396
+ nodes: readonly Readonly<{
397
+ name: string;
398
+ }>[];
399
+ }>;
400
+ validate: (a: unknown) => Result<Readonly<{
401
+ nodes: readonly Readonly<{
402
+ name: string;
403
+ }>[];
404
+ }>, readonly Readonly<{
405
+ path: readonly string[];
406
+ actualValue: unknown;
407
+ expectedType: string;
408
+ typeName: string;
409
+ details?: t.ValidationErrorDetails | undefined;
410
+ }>[]>;
411
+ structure?: t.TypeStructure;
412
+ annotations?: t.TypeAnnotations;
413
+ optional?: true;
414
+ }> & Readonly<{
415
+ shape: {
416
+ readonly nodes: Readonly<{
417
+ typeName: string;
418
+ defaultValue: readonly Readonly<{
419
+ name: string;
420
+ }>[];
421
+ is: (a: unknown) => a is readonly Readonly<{
422
+ name: string;
423
+ }>[];
424
+ assertIs: (a: unknown) => asserts a is readonly Readonly<{
425
+ name: string;
426
+ }>[];
427
+ cast: (a: unknown) => readonly Readonly<{
428
+ name: string;
429
+ }>[];
430
+ fill: (a: unknown) => readonly Readonly<{
431
+ name: string;
432
+ }>[];
433
+ prune: <B extends readonly Readonly<{
434
+ name: string;
435
+ }>[]>(a: B) => readonly Readonly<{
436
+ name: string;
437
+ }>[];
438
+ validate: (a: unknown) => Result<readonly Readonly<{
439
+ name: string;
440
+ }>[], readonly Readonly<{
441
+ path: readonly string[];
442
+ actualValue: unknown;
443
+ expectedType: string;
444
+ typeName: string;
445
+ details?: t.ValidationErrorDetails | undefined;
446
+ }>[]>;
447
+ structure?: t.TypeStructure;
448
+ annotations?: t.TypeAnnotations;
449
+ optional?: true;
450
+ }>;
451
+ };
452
+ }>;
453
+ };
454
+ }>;
455
+ /**
456
+ * The tip of `branch` on `origin`, by its whole ref name
457
+ * (`headShaFromListing`): the default branch read as the version pull
458
+ * request's branch is a set-aside recorded against a base that never moves.
459
+ */
460
+ export declare const remoteSha: (branch: string) => Promise<Result<string, string>>;
461
+ /**
462
+ * What GitHub enforces on the branch, every ruleset that applies to it
463
+ * together — rather than what `repo-settings/` declares, which changes
464
+ * nothing until it is applied.
465
+ */
466
+ export declare const readBranchRules: (api: ApiContext, branch: string) => Promise<Result<RulesetRequirements, string>>;
467
+ /**
468
+ * `CODEOWNERS` on the default branch, and what `pr-report-core`'s
469
+ * `review-hold.mts` reads about each of `numbers`, in one GraphQL request.
470
+ * `undefined` for a repository without `.github/CODEOWNERS`, the one of the
471
+ * three places GitHub looks that this repository uses.
472
+ *
473
+ * Every number goes in as a variable, and each pull request comes back under
474
+ * its own alias.
475
+ */
476
+ export declare const readReviewStates: (api: ApiContext, numbers: readonly number[], defaultBranch: string) => Promise<Result<Readonly<{
477
+ codeOwners: string | undefined;
478
+ states: ReadonlyMap<number, ReviewState>;
479
+ }>, string>>;
480
+ /**
481
+ * What the issues the open pull requests close add to the merge order
482
+ * (`merge-after.mts`'s `issueOrderOf`): one GraphQL request for what GitHub
483
+ * links and how it marked the bodies, and one more for the keyword-closed
484
+ * issues it did not link, only when there are any.
485
+ */
486
+ export declare const readIssueOrder: (api: ApiContext, numbers: readonly number[]) => Promise<Result<IssueOrder, string>>;
487
+ export declare const addSkipCiLabel: (api: ApiContext, prNumber: number) => Promise<Result<undefined, string>>;
488
+ /**
489
+ * This account's set-aside comment on each of `numbers` that has one. See
490
+ * {@link readOwnComments}.
491
+ */
492
+ export declare const readSetAsideComments: (api: ApiContext, numbers: readonly number[]) => Promise<Result<ReadonlyMap<number, OwnSetAsideComment>, string>>;
493
+ /**
494
+ * This account's set-aside comment, and the standing claim a session wrote
495
+ * (`claims.mts`), on each of `numbers` that has one, in one GraphQL request:
496
+ * every number goes in as a variable and each pull request comes back under
497
+ * its own alias. `pr-report-core`'s `set-aside.mts` says why only
498
+ * `viewerDidAuthor` counts; of several of a kind, the oldest is the one.
499
+ */
500
+ export declare const readOwnComments: (api: ApiContext, numbers: readonly number[]) => Promise<Result<Readonly<{
501
+ setAside: ReadonlyMap<number, OwnSetAsideComment>;
502
+ claims: ReadonlyMap<number, Claim>;
503
+ }>, string>>;
504
+ /**
505
+ * Writes `body` as the pull request's set-aside comment: over `existing`,
506
+ * this account's own, when there is one — a pull request has one, edited in
507
+ * place — and as a new comment otherwise.
508
+ */
509
+ export declare const writeSetAsideCommentOn: (api: ApiContext, prNumber: number, existing: number | undefined, body: string) => Promise<Result<undefined, string>>;
510
+ /**
511
+ * Every change of the pull request's base its timeline records, oldest
512
+ * first; `stack.mts` reads which branch GitHub moved it off.
513
+ *
514
+ * GraphQL, because the REST timeline does not say which branches a change of
515
+ * base was between.
516
+ */
517
+ export declare const readBaseChanges: (api: ApiContext, prNumber: number) => Promise<Result<readonly BaseChange[], string>>;
518
+ /**
519
+ * The pull request's place in one of GitHub's native stacks, or `undefined`
520
+ * when it is in none. GraphQL, because REST does not know them.
521
+ */
522
+ export declare const readNativeStack: (api: ApiContext, prNumber: number) => Promise<Result<NativeStackEntry | undefined, string>>;
523
+ /**
524
+ * The head the last merged pull request from `branch` was merged at, and the
525
+ * commit its merge made, or `undefined` when none was — the layer a
526
+ * retargeted pull request was stacked on, whose commits it may still carry.
527
+ */
528
+ export declare const mergedHeadOf: (api: ApiContext, branch: string) => Promise<Result<MergedHead | undefined, string>>;
529
+ /**
530
+ * The last merged of `pulls`, closed pull requests from one branch, or
531
+ * `undefined` when none of them merged.
532
+ */
533
+ export declare const latestMergedHead: (pulls: readonly t.TypeOf<typeof MergedPullSchema>[]) => MergedHead | undefined;
534
+ export type MergedHead = Readonly<{
535
+ number: number;
536
+ headSha: string;
537
+ /** The squash commit on the base; GitHub may not have it for a moment. */
538
+ mergeCommit: string | undefined;
539
+ }>;
540
+ declare const MergedPullSchema: Readonly<{
541
+ typeName: string;
542
+ defaultValue: Readonly<{
543
+ head: Readonly<{
544
+ sha: string;
545
+ }>;
546
+ merge_commit_sha: string | null;
547
+ merged_at: string | null;
548
+ number: number;
549
+ }>;
550
+ is: (a: unknown) => a is Readonly<{
551
+ head: Readonly<{
552
+ sha: string;
553
+ }>;
554
+ merge_commit_sha: string | null;
555
+ merged_at: string | null;
556
+ number: number;
557
+ }>;
558
+ assertIs: (a: unknown) => asserts a is Readonly<{
559
+ head: Readonly<{
560
+ sha: string;
561
+ }>;
562
+ merge_commit_sha: string | null;
563
+ merged_at: string | null;
564
+ number: number;
565
+ }>;
566
+ cast: (a: unknown) => Readonly<{
567
+ head: Readonly<{
568
+ sha: string;
569
+ }>;
570
+ merge_commit_sha: string | null;
571
+ merged_at: string | null;
572
+ number: number;
573
+ }>;
574
+ fill: (a: unknown) => Readonly<{
575
+ head: Readonly<{
576
+ sha: string;
577
+ }>;
578
+ merge_commit_sha: string | null;
579
+ merged_at: string | null;
580
+ number: number;
581
+ }>;
582
+ prune: <B extends Readonly<{
583
+ head: Readonly<{
584
+ sha: string;
585
+ }>;
586
+ merge_commit_sha: string | null;
587
+ merged_at: string | null;
588
+ number: number;
589
+ }>>(a: B) => Readonly<{
590
+ head: Readonly<{
591
+ sha: string;
592
+ }>;
593
+ merge_commit_sha: string | null;
594
+ merged_at: string | null;
595
+ number: number;
596
+ }>;
597
+ validate: (a: unknown) => Result<Readonly<{
598
+ head: Readonly<{
599
+ sha: string;
600
+ }>;
601
+ merge_commit_sha: string | null;
602
+ merged_at: string | null;
603
+ number: number;
604
+ }>, readonly Readonly<{
605
+ path: readonly string[];
606
+ actualValue: unknown;
607
+ expectedType: string;
608
+ typeName: string;
609
+ details?: t.ValidationErrorDetails | undefined;
610
+ }>[]>;
611
+ structure?: t.TypeStructure;
612
+ annotations?: t.TypeAnnotations;
613
+ optional?: true;
614
+ }> & Readonly<{
615
+ shape: {
616
+ readonly number: t.ConstrainedType<number, Readonly<{
617
+ readonly finite: undefined;
618
+ readonly int: undefined;
619
+ readonly safeInteger: undefined;
620
+ readonly nonZero: undefined;
621
+ readonly negative: undefined;
622
+ readonly nonNegative: undefined;
623
+ readonly positive: undefined;
624
+ readonly nonPositive: undefined;
625
+ readonly gt: undefined;
626
+ readonly gte: undefined;
627
+ readonly min: undefined;
628
+ readonly lt: undefined;
629
+ readonly lte: undefined;
630
+ readonly max: undefined;
631
+ readonly multipleOf: undefined;
632
+ readonly step: undefined;
633
+ }>>;
634
+ readonly head: Readonly<{
635
+ typeName: string;
636
+ defaultValue: Readonly<{
637
+ sha: string;
638
+ }>;
639
+ is: (a: unknown) => a is Readonly<{
640
+ sha: string;
641
+ }>;
642
+ assertIs: (a: unknown) => asserts a is Readonly<{
643
+ sha: string;
644
+ }>;
645
+ cast: (a: unknown) => Readonly<{
646
+ sha: string;
647
+ }>;
648
+ fill: (a: unknown) => Readonly<{
649
+ sha: string;
650
+ }>;
651
+ prune: <B extends Readonly<{
652
+ sha: string;
653
+ }>>(a: B) => Readonly<{
654
+ sha: string;
655
+ }>;
656
+ validate: (a: unknown) => Result<Readonly<{
657
+ sha: string;
658
+ }>, readonly Readonly<{
659
+ path: readonly string[];
660
+ actualValue: unknown;
661
+ expectedType: string;
662
+ typeName: string;
663
+ details?: t.ValidationErrorDetails | undefined;
664
+ }>[]>;
665
+ structure?: t.TypeStructure;
666
+ annotations?: t.TypeAnnotations;
667
+ optional?: true;
668
+ }> & Readonly<{
669
+ shape: {
670
+ readonly sha: t.ConstrainedType<string, Readonly<{
671
+ readonly nonempty: undefined;
672
+ readonly minLength: undefined;
673
+ readonly maxLength: undefined;
674
+ readonly startsWith: undefined;
675
+ readonly endsWith: undefined;
676
+ readonly includes: undefined;
677
+ readonly uppercase: undefined;
678
+ readonly lowercase: undefined;
679
+ readonly regex: undefined;
680
+ }>>;
681
+ };
682
+ }>;
683
+ readonly merge_commit_sha: Readonly<{
684
+ typeName: string;
685
+ defaultValue: string | null;
686
+ is: (a: unknown) => a is string | null;
687
+ assertIs: (a: unknown) => asserts a is string | null;
688
+ cast: (a: unknown) => string | null;
689
+ fill: (a: unknown) => string | null;
690
+ prune: <B extends string | null>(a: B) => string | null;
691
+ validate: (a: unknown) => Result<string | null, readonly Readonly<{
692
+ path: readonly string[];
693
+ actualValue: unknown;
694
+ expectedType: string;
695
+ typeName: string;
696
+ details?: t.ValidationErrorDetails | undefined;
697
+ }>[]>;
698
+ structure?: t.TypeStructure;
699
+ annotations?: t.TypeAnnotations;
700
+ optional?: true;
701
+ }>;
702
+ readonly merged_at: Readonly<{
703
+ typeName: string;
704
+ defaultValue: string | null;
705
+ is: (a: unknown) => a is string | null;
706
+ assertIs: (a: unknown) => asserts a is string | null;
707
+ cast: (a: unknown) => string | null;
708
+ fill: (a: unknown) => string | null;
709
+ prune: <B extends string | null>(a: B) => string | null;
710
+ validate: (a: unknown) => Result<string | null, readonly Readonly<{
711
+ path: readonly string[];
712
+ actualValue: unknown;
713
+ expectedType: string;
714
+ typeName: string;
715
+ details?: t.ValidationErrorDetails | undefined;
716
+ }>[]>;
717
+ structure?: t.TypeStructure;
718
+ annotations?: t.TypeAnnotations;
719
+ optional?: true;
720
+ }>;
721
+ };
722
+ }>;
723
+ /**
724
+ * Arms auto-merge, squash being the one method the ruleset allows. The
725
+ * mutation refuses when nothing holds the pull request, where
726
+ * `gh pr merge --auto` would merge it on the spot.
727
+ */
728
+ export declare const armAutoMerge: (api: ApiContext, nodeId: string) => Promise<Result<undefined, string>>;
729
+ /**
730
+ * Every check run GitHub Actions reported on one commit, every job of every
731
+ * workflow rather than only the required aggregates, so that a failure can
732
+ * be traced to the matrix entry under the aggregate. Other apps' runs — the
733
+ * codecov ones — are left out: nothing here can act on them, and none is
734
+ * required.
735
+ */
736
+ export declare const listCheckRuns: (api: ApiContext, headSha: string) => Promise<Result<readonly CheckRunReport[], string>>;
737
+ export declare const removeWorktree: (worktreeDir: string) => Promise<void>;
738
+ export {};
739
+ //# sourceMappingURL=github.d.mts.map