@rmartz/pr-lifecycle 7.0.0 → 8.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/README.md +1 -1
- package/dist/bin/pr-lifecycle.js +1 -1
- package/dist/{chunk-PJOTYSEK.js → chunk-ENU2AAWK.js} +61 -17
- package/dist/index.d.ts +46 -8
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
An **event-driven pull-request lifecycle reconciler** for GitHub Actions. On every
|
|
4
4
|
relevant GitHub event it recomputes a PR's lifecycle state from the PR's current
|
|
5
|
-
facts — draft status,
|
|
5
|
+
facts — draft status, pending bot review requests, the latest verdict from a
|
|
6
6
|
trusted author and the head SHA it reviewed — converges the PR's labels to match,
|
|
7
7
|
and **arms GitHub-native auto-merge when the PR reaches `approved`**. The
|
|
8
8
|
consumer's branch ruleset (required checks) then decides when the merge lands.
|
package/dist/bin/pr-lifecycle.js
CHANGED
|
@@ -455,7 +455,9 @@ function createHttpClient(options) {
|
|
|
455
455
|
isCrossRepository: pull.head.repo?.id !== pull.base.repo.id,
|
|
456
456
|
mergeable: pull.mergeable ?? void 0,
|
|
457
457
|
mergeState: pull.mergeable_state,
|
|
458
|
-
changedFileCount: pull.changed_files
|
|
458
|
+
changedFileCount: pull.changed_files,
|
|
459
|
+
createdAt: pull.created_at,
|
|
460
|
+
requestedBotReviewers: (pull.requested_reviewers ?? []).filter((reviewer) => reviewer.type === "Bot").map((reviewer) => reviewer.login)
|
|
459
461
|
};
|
|
460
462
|
},
|
|
461
463
|
async getBranchHeadSha(branch) {
|
|
@@ -512,6 +514,10 @@ function createHttpClient(options) {
|
|
|
512
514
|
async removeLabel(pr, name) {
|
|
513
515
|
await request("DELETE", `${repoPath}/issues/${pr}/labels/${encodeURIComponent(name)}`);
|
|
514
516
|
},
|
|
517
|
+
async getLastReadyForReviewAt(pr) {
|
|
518
|
+
const events = await paginate(`${repoPath}/issues/${pr}/events`);
|
|
519
|
+
return events.filter((event) => event.event === "ready_for_review").at(-1)?.created_at;
|
|
520
|
+
},
|
|
515
521
|
async listIssueComments(pr) {
|
|
516
522
|
const comments = await paginate(`${repoPath}/issues/${pr}/comments`);
|
|
517
523
|
return comments.map((comment) => comment.body ?? "");
|
|
@@ -621,8 +627,8 @@ function currentVerdict(facts, policy) {
|
|
|
621
627
|
// src/state.ts
|
|
622
628
|
var LIFECYCLE_STATES = [
|
|
623
629
|
"approved",
|
|
630
|
+
"awaiting-bot-review",
|
|
624
631
|
"awaiting-ci",
|
|
625
|
-
"awaiting-copilot",
|
|
626
632
|
"blocked-base-red",
|
|
627
633
|
"changes-requested",
|
|
628
634
|
"ci-failing",
|
|
@@ -632,7 +638,6 @@ var LIFECYCLE_STATES = [
|
|
|
632
638
|
"fix-required",
|
|
633
639
|
"review-requested"
|
|
634
640
|
];
|
|
635
|
-
var COPILOT_REVIEWER_LOGIN = "copilot-pull-request-reviewer[bot]";
|
|
636
641
|
var WIP_PATTERN = /\[wip\]/i;
|
|
637
642
|
function computeState(facts, policy) {
|
|
638
643
|
if (facts.status !== "open") {
|
|
@@ -657,14 +662,10 @@ function computeState(facts, policy) {
|
|
|
657
662
|
if (facts.ciStatus === "pending") {
|
|
658
663
|
return "awaiting-ci";
|
|
659
664
|
}
|
|
660
|
-
if (policy.skipCopilotReview
|
|
661
|
-
return "review
|
|
665
|
+
if (facts.pendingBotReviewers.length > 0 && policy.skipCopilotReview !== true) {
|
|
666
|
+
return "awaiting-bot-review";
|
|
662
667
|
}
|
|
663
|
-
|
|
664
|
-
const copilotReviewedHead = facts.reviews.some(
|
|
665
|
-
(review) => review.author.login === COPILOT_REVIEWER_LOGIN && reviewedCommits.has(review.commitSha)
|
|
666
|
-
);
|
|
667
|
-
return copilotReviewedHead ? "review-requested" : "awaiting-copilot";
|
|
668
|
+
return "review-requested";
|
|
668
669
|
}
|
|
669
670
|
|
|
670
671
|
// src/plan.ts
|
|
@@ -692,8 +693,8 @@ function lifecycleLabels(state) {
|
|
|
692
693
|
return ["fix required", "ci failing"];
|
|
693
694
|
case "review-requested":
|
|
694
695
|
return ["review requested"];
|
|
696
|
+
case "awaiting-bot-review":
|
|
695
697
|
case "awaiting-ci":
|
|
696
|
-
case "awaiting-copilot":
|
|
697
698
|
case "blocked-base-red":
|
|
698
699
|
case "closed":
|
|
699
700
|
case "draft":
|
|
@@ -1017,7 +1018,7 @@ var MAX_CHAIN_STEPS = 20;
|
|
|
1017
1018
|
function reviewedAncestors(input) {
|
|
1018
1019
|
return new Set(
|
|
1019
1020
|
input.reviews.filter((review) => review.commitSha !== input.headSha).filter(
|
|
1020
|
-
(review) => review.
|
|
1021
|
+
(review) => review.state === "APPROVED" || review.state === "CHANGES_REQUESTED" || review.body.includes("skill-meta")
|
|
1021
1022
|
).map((review) => review.commitSha)
|
|
1022
1023
|
);
|
|
1023
1024
|
}
|
|
@@ -1283,6 +1284,7 @@ async function gatherFacts(client, pr, policy = {}, options = {}) {
|
|
|
1283
1284
|
nodeId: pull.nodeId,
|
|
1284
1285
|
botEligibility,
|
|
1285
1286
|
lineage,
|
|
1287
|
+
createdAt: pull.createdAt,
|
|
1286
1288
|
facts: {
|
|
1287
1289
|
status: pull.merged ? "merged" : pull.state,
|
|
1288
1290
|
isDraft: pull.draft,
|
|
@@ -1298,11 +1300,46 @@ async function gatherFacts(client, pr, policy = {}, options = {}) {
|
|
|
1298
1300
|
cleanAncestors: lineage?.cleanAncestors ?? [],
|
|
1299
1301
|
updater,
|
|
1300
1302
|
rebasePending,
|
|
1301
|
-
reviews: reviews.map((review) => toReviewFact(review, permissions))
|
|
1303
|
+
reviews: reviews.map((review) => toReviewFact(review, permissions)),
|
|
1304
|
+
pendingBotReviewers: pull.requestedBotReviewers
|
|
1302
1305
|
}
|
|
1303
1306
|
};
|
|
1304
1307
|
}
|
|
1305
1308
|
|
|
1309
|
+
// src/github/settle.ts
|
|
1310
|
+
var DEFAULT_SETTLE_MS = 3e4;
|
|
1311
|
+
function realSleep(ms) {
|
|
1312
|
+
return new Promise((resolve) => {
|
|
1313
|
+
setTimeout(resolve, ms);
|
|
1314
|
+
});
|
|
1315
|
+
}
|
|
1316
|
+
async function settleDelay(client, pr, gathered, policy, settleMs, now) {
|
|
1317
|
+
const { facts } = gathered;
|
|
1318
|
+
if (policy.skipCopilotReview === true || computeState(facts, policy) !== "review-requested") {
|
|
1319
|
+
return 0;
|
|
1320
|
+
}
|
|
1321
|
+
if (facts.labels.includes("review requested")) {
|
|
1322
|
+
return 0;
|
|
1323
|
+
}
|
|
1324
|
+
const readyAt = await client.getLastReadyForReviewAt(pr);
|
|
1325
|
+
const reviewableSince = Math.max(
|
|
1326
|
+
Date.parse(gathered.createdAt),
|
|
1327
|
+
readyAt === void 0 ? 0 : Date.parse(readyAt)
|
|
1328
|
+
);
|
|
1329
|
+
const elapsed = now - reviewableSince;
|
|
1330
|
+
if (!Number.isFinite(elapsed)) {
|
|
1331
|
+
return settleMs;
|
|
1332
|
+
}
|
|
1333
|
+
return Math.min(settleMs, Math.max(0, settleMs - elapsed));
|
|
1334
|
+
}
|
|
1335
|
+
function resolveSettle(options = {}) {
|
|
1336
|
+
return {
|
|
1337
|
+
settleMs: options.settleMs ?? DEFAULT_SETTLE_MS,
|
|
1338
|
+
now: options.now ?? Date.now,
|
|
1339
|
+
sleep: options.sleep ?? realSleep
|
|
1340
|
+
};
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1306
1343
|
// src/github/reconcile.ts
|
|
1307
1344
|
var REFUSE_RELEASE = {
|
|
1308
1345
|
createIssueComment: () => Promise.reject(new Error("rebase requests need a release token")),
|
|
@@ -1311,7 +1348,14 @@ var REFUSE_RELEASE = {
|
|
|
1311
1348
|
updateBranch: () => Promise.reject(new Error("updating needs a release token"))
|
|
1312
1349
|
};
|
|
1313
1350
|
async function reconcilePullRequest(client, pr, policy, options = {}) {
|
|
1314
|
-
const
|
|
1351
|
+
const settle = resolveSettle(options.settle);
|
|
1352
|
+
let gathered = await gatherFacts(client, pr, policy, options);
|
|
1353
|
+
const settledMs = await settleDelay(client, pr, gathered, policy, settle.settleMs, settle.now());
|
|
1354
|
+
if (settledMs > 0) {
|
|
1355
|
+
await settle.sleep(settledMs);
|
|
1356
|
+
gathered = await gatherFacts(client, pr, policy, options);
|
|
1357
|
+
}
|
|
1358
|
+
const { facts, nodeId, botEligibility, lineage } = gathered;
|
|
1315
1359
|
const planned = planReconcile(facts, policy);
|
|
1316
1360
|
const unavailable = options.release === "unavailable";
|
|
1317
1361
|
const plan = unavailable ? withoutReleaseActions(planned) : planned;
|
|
@@ -1322,7 +1366,7 @@ async function reconcilePullRequest(client, pr, policy, options = {}) {
|
|
|
1322
1366
|
const wanted = planned.autoMerge;
|
|
1323
1367
|
const skippedAutoMerge = unavailable && (wanted === "arm" || wanted === "merge") ? wanted : void 0;
|
|
1324
1368
|
const skippedUpdate = unavailable && planned.update !== "none" ? planned.update : void 0;
|
|
1325
|
-
return { plan, botEligibility, lineage, skippedAutoMerge, skippedUpdate };
|
|
1369
|
+
return { plan, botEligibility, lineage, skippedAutoMerge, skippedUpdate, settledMs };
|
|
1326
1370
|
}
|
|
1327
1371
|
|
|
1328
1372
|
// src/github/token-advisory.ts
|
|
@@ -1362,7 +1406,7 @@ reconcile options:
|
|
|
1362
1406
|
--auto-update Update approved PRs merge-safety flags 'update required'
|
|
1363
1407
|
(Dependabot PRs are asked to rebase, never updated)
|
|
1364
1408
|
--trusted-authors <a,b> Only these logins (with write access) may cast verdicts
|
|
1365
|
-
--skip-copilot-review Don't wait for
|
|
1409
|
+
--skip-copilot-review Don't wait for requested bot reviewers (deprecated)
|
|
1366
1410
|
--hold-checks <a,b> Required checks whose pending is a hold (default: pr-policy)
|
|
1367
1411
|
--ignore-checks <a,b> Required checks CI never counts (default: merge-safety)
|
|
1368
1412
|
--dry-run Compute the plan without writing anything
|
|
@@ -1472,7 +1516,6 @@ export {
|
|
|
1472
1516
|
isTrustedAuthor,
|
|
1473
1517
|
currentVerdict,
|
|
1474
1518
|
LIFECYCLE_STATES,
|
|
1475
|
-
COPILOT_REVIEWER_LOGIN,
|
|
1476
1519
|
computeState,
|
|
1477
1520
|
LIFECYCLE_LABELS,
|
|
1478
1521
|
AUTO_MERGE_LABEL,
|
|
@@ -1492,6 +1535,7 @@ export {
|
|
|
1492
1535
|
MAX_CHAIN_STEPS,
|
|
1493
1536
|
gatherLineage,
|
|
1494
1537
|
gatherFacts,
|
|
1538
|
+
DEFAULT_SETTLE_MS,
|
|
1495
1539
|
reconcilePullRequest,
|
|
1496
1540
|
TOKEN_ADVISORY_MARKER,
|
|
1497
1541
|
RELEASE_TOKEN_DOCS_URL,
|
package/dist/index.d.ts
CHANGED
|
@@ -179,6 +179,11 @@ interface PullRequestFacts {
|
|
|
179
179
|
*/
|
|
180
180
|
rebasePending: boolean;
|
|
181
181
|
reviews: readonly ReviewFact[];
|
|
182
|
+
/**
|
|
183
|
+
* Logins of the bots (e.g. Copilot) whose review is requested and not yet
|
|
184
|
+
* submitted. Users and teams are left out: the lifecycle never waits on people.
|
|
185
|
+
*/
|
|
186
|
+
pendingBotReviewers: readonly string[];
|
|
182
187
|
}
|
|
183
188
|
interface ReconcilePolicy {
|
|
184
189
|
/**
|
|
@@ -196,8 +201,10 @@ interface ReconcilePolicy {
|
|
|
196
201
|
*/
|
|
197
202
|
autoUpdate?: boolean;
|
|
198
203
|
/**
|
|
199
|
-
* Don't wait for
|
|
200
|
-
*
|
|
204
|
+
* Don't wait for requested bot reviewers (e.g. Copilot) before
|
|
205
|
+
* `review-requested`. Rarely needed: a bot that won't review is never requested.
|
|
206
|
+
* Off by default. Deprecated: the wait now ends on its own; kept so existing
|
|
207
|
+
* callers keep working.
|
|
201
208
|
*/
|
|
202
209
|
skipCopilotReview?: boolean;
|
|
203
210
|
/**
|
|
@@ -243,6 +250,10 @@ interface PullRequestData {
|
|
|
243
250
|
mergeState: string | undefined;
|
|
244
251
|
/** How many files the PR changes (`changed_files`), to tell a full file list from a truncated one. */
|
|
245
252
|
changedFileCount: number;
|
|
253
|
+
/** ISO-8601 time the PR was opened. */
|
|
254
|
+
createdAt: string;
|
|
255
|
+
/** Logins of requested reviewers that are bots (users and teams left out). */
|
|
256
|
+
requestedBotReviewers: string[];
|
|
246
257
|
}
|
|
247
258
|
/** A check-run on a commit (the latest run per name). */
|
|
248
259
|
interface CheckRunData {
|
|
@@ -316,6 +327,8 @@ interface GitHubClient {
|
|
|
316
327
|
addLabels(pr: number, names: readonly string[]): Promise<void>;
|
|
317
328
|
/** Throws a GitHubApiError with status 404 when the label is not on the PR. */
|
|
318
329
|
removeLabel(pr: number, name: string): Promise<void>;
|
|
330
|
+
/** When the PR was last marked ready for review (ISO-8601), if ever. */
|
|
331
|
+
getLastReadyForReviewAt(pr: number): Promise<string | undefined>;
|
|
319
332
|
/** Bodies of the PR's conversation comments, oldest first. */
|
|
320
333
|
listIssueComments(pr: number): Promise<string[]>;
|
|
321
334
|
createIssueComment(pr: number, body: string): Promise<void>;
|
|
@@ -400,7 +413,7 @@ interface CliDeps {
|
|
|
400
413
|
/** Runs git for approval carry-over; tests inject one. Defaults to the real binary. */
|
|
401
414
|
git?: GitRunner;
|
|
402
415
|
}
|
|
403
|
-
declare const USAGE = "Usage: ai-pr-lifecycle <command> [options]\n\nCommands:\n reconcile Recompute a PR's lifecycle state and converge its labels\n help Show this message\n\nreconcile options:\n --repo <owner/repo> Repository (required)\n --pr <number> Pull request number (required)\n --arm-auto-merge Arm/disarm native auto-merge from the state\n --auto-update Update approved PRs merge-safety flags 'update required'\n (Dependabot PRs are asked to rebase, never updated)\n --trusted-authors <a,b> Only these logins (with write access) may cast verdicts\n --skip-copilot-review Don't wait for
|
|
416
|
+
declare const USAGE = "Usage: ai-pr-lifecycle <command> [options]\n\nCommands:\n reconcile Recompute a PR's lifecycle state and converge its labels\n help Show this message\n\nreconcile options:\n --repo <owner/repo> Repository (required)\n --pr <number> Pull request number (required)\n --arm-auto-merge Arm/disarm native auto-merge from the state\n --auto-update Update approved PRs merge-safety flags 'update required'\n (Dependabot PRs are asked to rebase, never updated)\n --trusted-authors <a,b> Only these logins (with write access) may cast verdicts\n --skip-copilot-review Don't wait for requested bot reviewers (deprecated)\n --hold-checks <a,b> Required checks whose pending is a hold (default: pr-policy)\n --ignore-checks <a,b> Required checks CI never counts (default: merge-safety)\n --dry-run Compute the plan without writing anything\n --json Print one JSON object (schemaVersion 1) on stdout\n --no-token-advisory Don't comment on the PR when arming lacks a release token\n\nEnvironment:\n GITHUB_TOKEN Token for reads and writes (required)\n PR_LIFECYCLE_TOKEN\n Real-actor token for arming, merging, and updating;\n without it, labels are kept but those are skipped\n GITHUB_API_URL API base URL (GitHub Enterprise Server)";
|
|
404
417
|
declare function runCli(argv: readonly string[], io: CliIo, deps: CliDeps): Promise<number>;
|
|
405
418
|
|
|
406
419
|
/**
|
|
@@ -431,9 +444,8 @@ declare function parseArgs(argv: readonly string[]): ParsedArgs;
|
|
|
431
444
|
* Lifecycle state, computed from facts in a fixed priority order. See
|
|
432
445
|
* docs/reconciler-design.md §State.
|
|
433
446
|
*/
|
|
434
|
-
declare const LIFECYCLE_STATES: readonly ["approved", "awaiting-
|
|
447
|
+
declare const LIFECYCLE_STATES: readonly ["approved", "awaiting-bot-review", "awaiting-ci", "blocked-base-red", "changes-requested", "ci-failing", "closed", "draft", "escalation-needed", "fix-required", "review-requested"];
|
|
435
448
|
type LifecycleState = (typeof LIFECYCLE_STATES)[number];
|
|
436
|
-
declare const COPILOT_REVIEWER_LOGIN = "copilot-pull-request-reviewer[bot]";
|
|
437
449
|
declare function computeState(facts: PullRequestFacts, policy: ReconcilePolicy): LifecycleState;
|
|
438
450
|
|
|
439
451
|
/**
|
|
@@ -536,6 +548,8 @@ interface GatheredPullRequest {
|
|
|
536
548
|
botEligibility: BotEligibility;
|
|
537
549
|
/** How far approval carry-over verified, for reporting (absent when off). */
|
|
538
550
|
lineage: Lineage | undefined;
|
|
551
|
+
/** When the PR was opened (ISO-8601), for the settle wait (settle.ts). */
|
|
552
|
+
createdAt: string;
|
|
539
553
|
}
|
|
540
554
|
interface GatherOptions {
|
|
541
555
|
/**
|
|
@@ -550,7 +564,28 @@ interface GatherOptions {
|
|
|
550
564
|
}
|
|
551
565
|
declare function gatherFacts(client: GitHubClient, pr: number, policy?: ReconcilePolicy, options?: GatherOptions): Promise<GatheredPullRequest>;
|
|
552
566
|
|
|
567
|
+
/**
|
|
568
|
+
* The settle wait: a PR that just became reviewable isn't moved to
|
|
569
|
+
* `review-requested` until bot reviewers have had time to be requested. Copilot's
|
|
570
|
+
* auto-review request lands a few seconds after the PR opens (observed: up to 5s),
|
|
571
|
+
* so a run that reads the PR sooner would see no request and skip the wait. The
|
|
572
|
+
* wait happens inside the run, never as "stay put and wait for the next event":
|
|
573
|
+
* when no bot is coming, no further event may ever fire. See
|
|
574
|
+
* docs/reconciler-design.md §Waiting for bot reviewers.
|
|
575
|
+
*/
|
|
576
|
+
/** Long enough to cover the observed request delay several times over. */
|
|
577
|
+
declare const DEFAULT_SETTLE_MS = 30000;
|
|
578
|
+
interface SettleOptions {
|
|
579
|
+
/** How long after a PR becomes reviewable to wait for bot requests. */
|
|
580
|
+
settleMs?: number;
|
|
581
|
+
/** Clock and timer, injectable for tests. */
|
|
582
|
+
now?: () => number;
|
|
583
|
+
sleep?: (ms: number) => Promise<void>;
|
|
584
|
+
}
|
|
585
|
+
|
|
553
586
|
interface ReconcileOptions extends GatherOptions {
|
|
587
|
+
/** The settle wait for a PR that just became reviewable (settle.ts). */
|
|
588
|
+
settle?: SettleOptions;
|
|
554
589
|
/** Compute and return the plan without writing anything. */
|
|
555
590
|
dryRun?: boolean;
|
|
556
591
|
/**
|
|
@@ -570,10 +605,12 @@ interface ReconcileResult {
|
|
|
570
605
|
skippedAutoMerge: 'arm' | 'merge' | undefined;
|
|
571
606
|
/** The branch update the plan wanted but skipped because `release` was unavailable. */
|
|
572
607
|
skippedUpdate: Exclude<UpdateAction, 'none'> | undefined;
|
|
608
|
+
/** How long the run waited for bot review requests before gathering again (ms). */
|
|
609
|
+
settledMs: number;
|
|
573
610
|
}
|
|
574
611
|
/**
|
|
575
|
-
* One full reconcile pass for a PR: gather its facts
|
|
576
|
-
* execute. Returns the plan, the bot-eligibility verdict, and the carry-over
|
|
612
|
+
* One full reconcile pass for a PR: gather its facts (waiting to settle first if it
|
|
613
|
+
* just became reviewable), plan, and (unless dry-run) execute. Returns the plan, the bot-eligibility verdict, and the carry-over
|
|
577
614
|
* result so callers can report what changed and why.
|
|
578
615
|
*/
|
|
579
616
|
declare function reconcilePullRequest(client: GitHubClient, pr: number, policy: ReconcilePolicy, options?: ReconcileOptions): Promise<ReconcileResult>;
|
|
@@ -707,6 +744,7 @@ interface ParsedVerdict {
|
|
|
707
744
|
declare function parseVerdict(review: ReviewFact): ParsedVerdict | undefined;
|
|
708
745
|
/** Whether an author may cast a counting verdict under the policy. */
|
|
709
746
|
declare function isTrustedAuthor(author: ReviewAuthor, policy: ReconcilePolicy): boolean;
|
|
747
|
+
/** The latest verdict that counts for the PR's current head, if any. */
|
|
710
748
|
declare function currentVerdict(facts: PullRequestFacts, policy: ReconcilePolicy): Verdict | undefined;
|
|
711
749
|
|
|
712
|
-
export { ACTOR_TYPES, AUTO_MERGE_LABEL, type ActorType, type AutoMergeAction, BRANCH_UPDATERS, type BotEligibility, type BotPrCommit, type BotPrFacts, type BotPrType, type BranchUpdater,
|
|
750
|
+
export { ACTOR_TYPES, AUTO_MERGE_LABEL, type ActorType, type AutoMergeAction, BRANCH_UPDATERS, type BotEligibility, type BotPrCommit, type BotPrFacts, type BotPrType, type BranchUpdater, type ChangedFile, type CliDeps, type CliIo, type CollaboratorPermission, type CommitData, DEFAULT_SETTLE_MS, DEPENDABOT_LOGIN, DEPENDABOT_REBASE_COMMAND, DEPENDABOT_REBASING_NOTICE, DEPENDABOT_UPDATE_TYPES, type DependabotUpdateType, type GatherOptions, type GatheredPullRequest, GitHubApiError, type GitHubClient, type GitResult, type GitRunner, type HttpClientOptions, LIFECYCLE_LABELS, LIFECYCLE_STATES, type LabelDefinition, type LifecycleLabel, type LifecycleState, type Lineage, type LineageInput, MAX_CHAIN_STEPS, type MergeStep, type MergeVerifier, OWNED_LABEL_DEFINITIONS, PR_STATUSES, type ParsedArgs, type ParsedVerdict, type PlanTarget, type PullRequestData, type PullRequestFacts, type PullRequestStatus, RELEASE_PLEASE_BRANCH_PREFIX, RELEASE_TOKEN_DOCS_URL, REPO_PERMISSIONS, REVIEW_STATES, type ReconcileArgs, type ReconcileJson, type ReconcileOptions, type ReconcilePlan, type ReconcilePolicy, type ReconcileResult, type ReconcileTarget, type ReleaseActions, type ReleaseDiffVerdict, type RepoPermission, type RepoSource, type ReviewAuthor, type ReviewData, type ReviewFact, type ReviewState, SCHEMA_VERSION, type SettleOptions, TOKEN_ADVISORY_MARKER, UPDATE_REQUIRED_LABEL, USAGE, type UpdateAction, VERDICTS, type Verdict, buildRebaseRequestBody, buildTokenAdvisoryBody, classifyBotPr, classifyReleaseDiff, computeState, createGitRunner, createHttpClient, createMergeVerifier, currentVerdict, executePlan, formatSummary, gatherFacts, gatherLineage, isApiStatus, isRebasePending, isTrustedAuthor, isVersionOnlyPatch, parseArgs, parseDependabotUpdateType, parseGitVersion, parseVerdict, planReconcile, postTokenAdvisory, rebaseRequestMarker, reconcilePullRequest, runCli, toReconcileJson, withoutReleaseActions };
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
ACTOR_TYPES,
|
|
3
3
|
AUTO_MERGE_LABEL,
|
|
4
4
|
BRANCH_UPDATERS,
|
|
5
|
-
|
|
5
|
+
DEFAULT_SETTLE_MS,
|
|
6
6
|
DEPENDABOT_LOGIN,
|
|
7
7
|
DEPENDABOT_REBASE_COMMAND,
|
|
8
8
|
DEPENDABOT_REBASING_NOTICE,
|
|
@@ -50,12 +50,12 @@ import {
|
|
|
50
50
|
runCli,
|
|
51
51
|
toReconcileJson,
|
|
52
52
|
withoutReleaseActions
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-ENU2AAWK.js";
|
|
54
54
|
export {
|
|
55
55
|
ACTOR_TYPES,
|
|
56
56
|
AUTO_MERGE_LABEL,
|
|
57
57
|
BRANCH_UPDATERS,
|
|
58
|
-
|
|
58
|
+
DEFAULT_SETTLE_MS,
|
|
59
59
|
DEPENDABOT_LOGIN,
|
|
60
60
|
DEPENDABOT_REBASE_COMMAND,
|
|
61
61
|
DEPENDABOT_REBASING_NOTICE,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rmartz/pr-lifecycle",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Event-driven PR lifecycle reconciler: recomputes a pull request's lifecycle labels from its current facts on every GitHub event and arms native auto-merge on approval.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|