mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-04 13:42:16 +00:00
chore: Add git status output to log when push fails (#531)
This commit is contained in:
parent
5cd5ce53ad
commit
e4fbd828d7
1 changed files with 5 additions and 1 deletions
|
|
@ -128,6 +128,7 @@ export async function checkoutBranchAndCommit(
|
||||||
);
|
);
|
||||||
|
|
||||||
if (pushRes instanceof Error) {
|
if (pushRes instanceof Error) {
|
||||||
|
const gitStatus = await sandbox.git.status(absoluteRepoDir);
|
||||||
const errorFields = {
|
const errorFields = {
|
||||||
...(pushRes instanceof Error
|
...(pushRes instanceof Error
|
||||||
? {
|
? {
|
||||||
|
|
@ -138,7 +139,10 @@ export async function checkoutBranchAndCommit(
|
||||||
}
|
}
|
||||||
: pushRes),
|
: pushRes),
|
||||||
};
|
};
|
||||||
logger.error("Failed to push changes", errorFields);
|
logger.error("Failed to push changes", {
|
||||||
|
...errorFields,
|
||||||
|
gitStatus: JSON.stringify(gitStatus, null, 2),
|
||||||
|
});
|
||||||
throw new Error("Failed to push changes");
|
throw new Error("Failed to push changes");
|
||||||
} else {
|
} else {
|
||||||
logger.info("Successfully pushed changes");
|
logger.info("Successfully pushed changes");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue