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): skip idle mcp snapshot checkout (#126718)

posthog[bot]f430ff31914d
diff --git a/.github/workflows/ci-mcp.yml b/.github/workflows/ci-mcp.yml
index 9aad6a0c45d4..8a3df45ce125 100644
--- a/.github/workflows/ci-mcp.yml
+++ b/.github/workflows/ci-mcp.yml
@@ -807,21 +807,6 @@ jobs:
contents: write
pull-requests: write
steps:
- - name: Get app token
- id: app-token
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
- with:
- client-id: ${{ secrets.GH_APP_POSTHOG_TESTS_APP_ID }}
- private-key: ${{ secrets.GH_APP_POSTHOG_TESTS_PRIVATE_KEY }}
-
- - name: Checkout
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- ref: ${{ github.event.pull_request.head.sha }}
- repository: ${{ github.event.pull_request.head.repo.full_name }}
- token: ${{ steps.app-token.outputs.token }}
- fetch-depth: 1
-
- name: Download snapshot patches
id: download-patches
continue-on-error: true
@@ -849,6 +834,23 @@ jobs:
echo "Patch files empty or missing - no snapshot changes"
fi
+ - name: Get app token
+ if: steps.check-patches.outputs.has-patches == 'true'
+ id: app-token
+ uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
+ with:
+ client-id: ${{ secrets.GH_APP_POSTHOG_TESTS_APP_ID }}
+ private-key: ${{ secrets.GH_APP_POSTHOG_TESTS_PRIVATE_KEY }}
+
+ - name: Checkout
+ if: steps.check-patches.outputs.has-patches == 'true'
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ with:
+ ref: ${{ github.event.pull_request.head.sha }}
+ repository: ${{ github.event.pull_request.head.repo.full_name }}
+ token: ${{ steps.app-token.outputs.token }}
+ fetch-depth: 1
+
- name: Commit snapshots
if: steps.check-patches.outputs.has-patches == 'true'
uses: ./.github/actions/commit-snapshots