fix: checker uses git diff HEAD (working tree) instead of HEAD~1..HEAD
CI / test (push) Has been cancelled
CI / test (push) Has been cancelled
Coder may not commit changes, so HEAD~1..HEAD misses uncommitted files. git diff --name-only HEAD catches both staged and unstaged changes.
This commit is contained in:
@@ -41,9 +41,7 @@ export function createMetaCheckerRole(opts: {
|
||||
let changedFiles: string[] = [];
|
||||
try {
|
||||
// Get all uncommitted changes + last commit changes
|
||||
const diffOutput = exec(
|
||||
'git diff --name-only HEAD~1 HEAD 2>/dev/null || git diff --name-only',
|
||||
);
|
||||
const diffOutput = exec('git diff --name-only HEAD 2>/dev/null || git diff --name-only');
|
||||
changedFiles = diffOutput.split('\n').filter(Boolean);
|
||||
} catch {
|
||||
// No git history — check working tree
|
||||
|
||||
Reference in New Issue
Block a user