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.

chore(ci): narrow the bot ip update checkout (#128030)

posthog[bot]c285305a6d46
diff --git a/.github/workflows/update-bot-ips.yml b/.github/workflows/update-bot-ips.yml
index 00cbfcd35646..ab548a65a958 100644
--- a/.github/workflows/update-bot-ips.yml
+++ b/.github/workflows/update-bot-ips.yml
@@ -26,6 +26,10 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
token: ${{ steps.app-token.outputs.token }}
+ sparse-checkout: |
+ /bin/update-bots-list
+ /nodejs/assets/bot-ips.txt
+ sparse-checkout-cone-mode: false
- name: Run update script
run: |
diff --git a/docs/internal/ci-things-already-tried.md b/docs/internal/ci-things-already-tried.md
index 699fe98a3924..6fef0fa08aff 100644
--- a/docs/internal/ci-things-already-tried.md
+++ b/docs/internal/ci-things-already-tried.md
@@ -464,6 +464,7 @@ The description covers the backend, frontend, and Rust workflows. The diff chang
The PR did not merge, and no person reviewed it. The stale bot closed it. Thus there is no recorded reason for the result.
Sparse-checkout is correct for small jobs, and `ci-storybook.yml`, `ci-security.yaml`, and `pr-resolve-outdated-bot-comments.yml` use it today.
+The bot IP updater needs only `bin/update-bots-list` and `nodejs/assets/bot-ips.txt`; its sparse checkout retains the tracked output so Git can detect and commit updates.
`ci-depot-action-mirrors.yml` checks out `.depot/`, `.github/actions/`, and `depot_mirrors.py`; its Git diff still covers all changed paths.
The Dagster path validator also uses a sparse checkout of every internal Python source file, its workflow, and the local uv action. Its import resolver needs the complete internal Python tree, including namespace packages.
`ci-rust.yml` also uses it on the build and test jobs, but that came before this PR.