mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 10:23:14 +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) {
|
||||
const gitStatus = await sandbox.git.status(absoluteRepoDir);
|
||||
const errorFields = {
|
||||
...(pushRes instanceof Error
|
||||
? {
|
||||
|
|
@ -138,7 +139,10 @@ export async function checkoutBranchAndCommit(
|
|||
}
|
||||
: 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");
|
||||
} else {
|
||||
logger.info("Successfully pushed changes");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue