Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(ci): keep origin in depot test discovery checkout (#105352)

Raúl Negrón-Otero0c01a414e654
diff --git a/.depot/workflows/ci-backend.yml b/.depot/workflows/ci-backend.yml
index 71d5b8115da5..be1c855e2e99 100644
--- a/.depot/workflows/ci-backend.yml
+++ b/.depot/workflows/ci-backend.yml
@@ -15,6 +15,8 @@
# so the relay's failure log prints the `depot ci` commands that retry it, and the label
# that sends the PR back to GitHub Actions.
# - runs-on: depot-* labels instead of GitHub-hosted ubuntu-24.04
+# - turbo-discover adds the `origin` remote before its history fetch when it is missing.
+# Depot CI serves an input-less actions/checkout from a fast clone that has no remote.
# - action paths: ./.depot/actions/... instead of ./.github/actions/... (pnpm-install,
# setup-sqlx-cli, setup-python-cached, setup-uv, setup-turbo, and paths-filter mirror
# the canonical composites; any deltas are documented in each mirror's header). Every
@@ -690,6 +692,8 @@ jobs:
# --depth, not --deepen: --deepen adds no history once GitHub has replaced the PR's
# merge ref, because no ref then points at GITHUB_SHA.
run: |
+ # Depot CI serves an input-less checkout from a fast clone that adds no origin remote.
+ git remote get-url origin >/dev/null 2>&1 || git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
git fetch --no-tags --filter=blob:none --depth=1000 origin "$GITHUB_SHA"
echo "History depth: $(git rev-list --count HEAD)"
- name: Verify PR merge for test selection