pr-shepherd 0.32.3 → 0.32.4
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/bin/commands/poll.mjs
CHANGED
|
@@ -66,9 +66,16 @@ export async function runPoll(opts) {
|
|
|
66
66
|
const untilTerminal = untilTerminalOpt === true;
|
|
67
67
|
let dotsPrinted = false;
|
|
68
68
|
let lastWaitSignature = null;
|
|
69
|
+
// When prNumber is omitted, iterateOpts.prNumber starts undefined and each tick would otherwise
|
|
70
|
+
// re-infer the PR from the current branch. That inference query only matches OPEN PRs, so once
|
|
71
|
+
// the monitored PR merges it returns nothing and runIterate throws instead of reporting the
|
|
72
|
+
// terminal CANCEL/merged result. Pin the PR resolved by the first tick so later ticks target it
|
|
73
|
+
// directly and never re-run branch discovery.
|
|
74
|
+
let prNumber = opts.prNumber;
|
|
69
75
|
while (true) {
|
|
70
76
|
tick += 1;
|
|
71
|
-
lastResult = await runIterate(iterateOpts);
|
|
77
|
+
lastResult = await runIterate({ ...iterateOpts, prNumber });
|
|
78
|
+
prNumber ??= lastResult.pr;
|
|
72
79
|
if (lastResult.action !== "wait" && !(untilTerminal && lastResult.action === "mark_ready")) {
|
|
73
80
|
break;
|
|
74
81
|
}
|
package/package.json
CHANGED