mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 18:33:15 +00:00
chore: Set upstream branch when cloning repo (#522)
This commit is contained in:
parent
3bae3f7bd7
commit
aec3a8fc1b
2 changed files with 25 additions and 1 deletions
|
|
@ -251,6 +251,18 @@ async function performClone(
|
|||
logger.info("Created branch", {
|
||||
branch: branchName,
|
||||
});
|
||||
|
||||
const setUpstreamBranchRes = await sandbox.process.executeCommand(
|
||||
`git branch --set-upstream-to=origin/${branchName}`,
|
||||
absoluteRepoDir,
|
||||
);
|
||||
if (setUpstreamBranchRes.exitCode !== 0) {
|
||||
logger.error("Failed to set upstream branch", {
|
||||
setUpstreamBranchRes,
|
||||
});
|
||||
}
|
||||
logger.info("Set upstream branch");
|
||||
|
||||
return branchName;
|
||||
} catch {
|
||||
logger.info("Failed to create branch, checking out branch", {
|
||||
|
|
@ -262,5 +274,17 @@ async function performClone(
|
|||
logger.info("Checked out branch", {
|
||||
branch: branchName,
|
||||
});
|
||||
|
||||
const setUpstreamBranchRes = await sandbox.process.executeCommand(
|
||||
`git branch --set-upstream-to=origin/${branchName}`,
|
||||
absoluteRepoDir,
|
||||
);
|
||||
if (setUpstreamBranchRes.exitCode !== 0) {
|
||||
logger.error("Failed to set upstream branch", {
|
||||
setUpstreamBranchRes,
|
||||
});
|
||||
}
|
||||
logger.info("Set upstream branch");
|
||||
|
||||
return branchName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export const ALLOWED_USERS = [
|
|||
"xornivore",
|
||||
"xuro-langchain",
|
||||
"Palashio",
|
||||
"ads2280"
|
||||
"ads2280",
|
||||
];
|
||||
|
||||
// HACK: Until we setup proper support for API credits, we will only allow users to self host Open SWE
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue