refactor: report missing PR diff ranges via OverlayDisabledReason and disable overlay

This commit is contained in:
Sam Robson
2026-04-30 16:12:30 +01:00
parent 5ded561dcd
commit 3cc8dd3e59
6 changed files with 112 additions and 101 deletions
+8 -8
View File
@@ -190,7 +190,7 @@ test.serial(
);
test.serial(
"prepareDiffInformedAnalysis: returns shouldRun=false when not a pull request",
"prepareDiffInformedAnalysis: returns false when not a pull request",
async (t) => {
await withTmpDir(async (tmpDir) => {
setupActionsVars(tmpDir, tmpDir);
@@ -209,13 +209,13 @@ test.serial(
logger,
);
t.deepEqual(result, { shouldRun: false, hasDiffRanges: false });
t.false(result);
});
},
);
test.serial(
"prepareDiffInformedAnalysis: returns shouldRun=false when applicability check throws",
"prepareDiffInformedAnalysis: returns false when applicability check throws",
async (t) => {
await withTmpDir(async (tmpDir) => {
setupActionsVars(tmpDir, tmpDir);
@@ -239,13 +239,13 @@ test.serial(
logger,
);
t.deepEqual(result, { shouldRun: false, hasDiffRanges: false });
t.false(result);
});
},
);
test.serial(
"prepareDiffInformedAnalysis: returns hasDiffRanges=true when the diff is fetched successfully",
"prepareDiffInformedAnalysis: returns true when the diff is fetched successfully",
async (t) => {
await withTmpDir(async (tmpDir) => {
setupActionsVars(tmpDir, tmpDir);
@@ -276,13 +276,13 @@ test.serial(
logger,
);
t.deepEqual(result, { shouldRun: true, hasDiffRanges: true });
t.true(result);
});
},
);
test.serial(
"prepareDiffInformedAnalysis: returns hasDiffRanges=false when the diff API call fails",
"prepareDiffInformedAnalysis: returns false when the diff API call fails",
async (t) => {
await withTmpDir(async (tmpDir) => {
setupActionsVars(tmpDir, tmpDir);
@@ -313,7 +313,7 @@ test.serial(
logger,
);
t.deepEqual(result, { shouldRun: true, hasDiffRanges: false });
t.false(result);
});
},
);