Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions codeclash/games/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,7 @@ def get_environment(self, branch_name: str | None = None) -> DockerEnvironment:
if current_url.startswith("https://") and "@" not in current_url:
new_url = current_url.replace("https://", f"https://{github_token}@")
assert_zero_exit_code(
environment.execute(
f"git remote set-url origin {new_url} && "
f"git fetch --all && "
f"git pull && "
f"git branch {branch_name} && "
f"git checkout {branch_name}"
)
environment.execute(f"git remote set-url origin {new_url} && git fetch --all && git pull")
)
else:
self.logger.warning("Remote origin URL is not https://, won't be able to set token and pull.")
Expand Down