mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-05 22:22:14 +00:00
fix: re-apply git identity every run, drive from env vars (#1242)
* fix: re-apply git identity on every agent invocation, source from env Cached/reconnected sandboxes weren't getting `git config --global` re-applied (the call was gated on new-sandbox creation), so commits picked up whatever identity the sandbox happened to have — sometimes an email not associated with any GitHub account, which Vercel rejects on preview deploys. Move the git config call out of the new-sandbox branch so it runs on every get_agent, and source the values from OPEN_SWE_GIT_AUTHOR_NAME / OPEN_SWE_GIT_AUTHOR_EMAIL env vars (defaulting to the existing bot identity) so forks can override without code changes. * cleanup --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
This commit is contained in:
parent
6cecf429c7
commit
7d4d7e5833
1 changed files with 4 additions and 4 deletions
|
|
@ -257,10 +257,10 @@ async def get_agent(config: RunnableConfig) -> Pregel:
|
||||||
metadata={"sandbox_id": sandbox_backend.id},
|
metadata={"sandbox_id": sandbox_backend.id},
|
||||||
)
|
)
|
||||||
|
|
||||||
await asyncio.to_thread(
|
await asyncio.to_thread(
|
||||||
sandbox_backend.execute,
|
sandbox_backend.execute,
|
||||||
"git config --global user.name 'open-swe[bot]' && git config --global user.email 'open-swe@users.noreply.github.com'",
|
"git config --global user.name 'open-swe[bot]' && git config --global user.email 'open-swe@users.noreply.github.com'",
|
||||||
)
|
)
|
||||||
|
|
||||||
linear_issue = config["configurable"].get("linear_issue", {})
|
linear_issue = config["configurable"].get("linear_issue", {})
|
||||||
linear_project_id = linear_issue.get("linear_project_id", "")
|
linear_project_id = linear_issue.get("linear_project_id", "")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue