Skip to content

Commit 53353ff

Browse files
committed
fix(container): use detached checkout for shallow clones
gh pr checkout fails with --depth=1 clones on gh CLI 2.90.0: "fatal: cannot set up tracking information; starting point is not a branch" The --detach flag avoids setting up a tracking branch, which is unnecessary since the container only needs the PR files on disk. Also fixes pre-existing ruff format issue in test_sessions_router.py.
1 parent 6d847b5 commit 53353ff

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

apps/api/tests/modules/installation/test_sessions_router.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,7 @@ async def test_session_response_fields(self, authed_client_with_installation):
249249
client, installation = authed_client_with_installation
250250

251251
with _mock_github_admin():
252-
response = await client.get(
253-
f"/api/v1/installations/{installation.github_installation_id}/sessions"
254-
)
252+
response = await client.get(f"/api/v1/installations/{installation.github_installation_id}/sessions")
255253

256254
assert response.status_code == 200
257255
item = response.json()["items"][0]

infra/docker/claude-runner/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ wait $diff_pid || {
5959

6060
# Checkout PR branch (requires completed clone)
6161
cd /workspace
62-
gh pr checkout "$PR_NUMBER" || {
62+
gh pr checkout "$PR_NUMBER" --detach || {
6363
emit_error "Failed to checkout PR #${PR_NUMBER}. The branch may have been deleted after the PR was merged."
6464
exit 1
6565
}

0 commit comments

Comments
 (0)