fix(server): fail closed on unmatched PR status
This commit is contained in:
2 files changed
+1
-2
No files matched your search
@@ -279,7 +279,6 @@ it.effect("does not settle when PR verification fails or belongs to another bran
|
||||
id: "mismatched-merge",
|
||||
branch: "feature/current",
|
||||
cwd: "/repo/mismatched",
|
||||
pinned: true,
|
||||
});
|
||||
const { reactor, dispatched } = yield* makeHarness({
|
||||
threads: [lookupFailed, mismatchedMerge],
|
||||
|
||||
@@ -68,7 +68,7 @@ function liveChangeRequestState(
|
||||
status: VcsStatusResult,
|
||||
): AutomaticSettlementChangeRequestState {
|
||||
if (thread.branch === null) return null;
|
||||
if (status.refName !== thread.branch || status.pr?.headRef !== thread.branch) return null;
|
||||
if (status.refName !== thread.branch || status.pr?.headRef !== thread.branch) return "unknown";
|
||||
return status.pr.state;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user