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): bucket remaining per-PR setup-node/python calls (#75953)

Raúl Negrón-Oterocb6b3b118c37
diff --git a/.depot/workflows/ci-backend.yml b/.depot/workflows/ci-backend.yml
index f1e3e2165638..348014482a8f 100644
--- a/.depot/workflows/ci-backend.yml
+++ b/.depot/workflows/ci-backend.yml
@@ -821,8 +821,9 @@ jobs:
db redis7 clickhouse zookeeper kafka objectstorage \
temporal elasticsearch objectstorage-azure \
</dev/null >"${RUNNER_TEMP:-/tmp}/compose-launch.log" 2>&1
- # Shadow trial: canonical threads a setup-action app token into
- # pnpm-install; mint stripped here (secret not available on Depot).
+ # Shadow trial: canonical threads a setup-action app token into both
+ # pnpm-install and setup-python; mint stripped here (secret not
+ # available on Depot), so setup-python keeps the bot PAT.
- name: Install pnpm dependencies
uses: ./.depot/actions/pnpm-install
with:
diff --git a/.github/workflows/auto-assign-labels.yml b/.github/workflows/auto-assign-labels.yml
index 98ca9c308919..8a26483ec39e 100644
--- a/.github/workflows/auto-assign-labels.yml
+++ b/.github/workflows/auto-assign-labels.yml
@@ -42,10 +42,23 @@ jobs:
# MUST be `master` so we never execute untrusted PR code.
ref: master
+ # No fork guard: pull_request_target runs in base context, so org
+ # secrets are available even when the PR comes from a fork.
+ - name: Mint setup-action GitHub token
+ id: setup-gh-token
+ continue-on-error: true
+ uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
+ with:
+ client-id: ${{ secrets.GH_APP_POSTHOG_SETUP_ACTIONS_APP_ID }}
+ private-key: ${{ secrets.GH_APP_POSTHOG_SETUP_ACTIONS_PRIVATE_KEY }}
+ skip-token-revoke: true
+
- name: Setup Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version-file: .nvmrc
+ # Resolve the node-versions manifest on the app token, not the shared per-repo GITHUB_TOKEN bucket
+ token: ${{ steps.setup-gh-token.outputs.token || github.token }}
- name: Run label assignment script
env:
diff --git a/.github/workflows/auto-assign-reviewers.yml b/.github/workflows/auto-assign-reviewers.yml
index c9b647a2fc2c..ec2ad4369e58 100644
--- a/.github/workflows/auto-assign-reviewers.yml
+++ b/.github/workflows/auto-assign-reviewers.yml
@@ -56,6 +56,8 @@ jobs:
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13'
+ # Same reasoning as the node manifest lookup above
+ token: ${{ steps.app-token.outputs.token || github.token }}
# Exact pin: this pull_request_target workflow runs with an app token,
# so a floating version must not be able to pull fresh code at run time.
diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.yml
index a7a1af320360..88aa02d708ca 100644
--- a/.github/workflows/ci-backend.yml
+++ b/.github/workflows/ci-backend.yml
@@ -829,7 +829,7 @@ jobs:
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.13.13
- token: ${{ secrets.POSTHOG_BOT_PAT }}
+ token: ${{ steps.setup-gh-token.outputs.token || github.token }}
- name: Install uv
id: setup-uv