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): use the vendored paths-filter in the desktop workflows (#127397)

Robbie109c342c9d96
diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml
index 20e82623eaf4..1f989865e95e 100644
--- a/.github/workflows/desktop-build.yml
+++ b/.github/workflows/desktop-build.yml
@@ -35,6 +35,7 @@ jobs:
timeout-minutes: 5
if: github.event_name != 'merge_group' && inputs.run-suite == ''
permissions:
+ contents: read
pull-requests: read
outputs:
# On master pushes the filter step is skipped and everything runs.
@@ -42,6 +43,13 @@ jobs:
code: ${{ steps.filter.outputs.agent == 'true' && 'true' || steps.filter.outputs.code || 'true' }}
workflow: ${{ steps.filter.outputs.workflow || 'true' }}
steps:
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ if: github.event_name == 'pull_request'
+ with:
+ persist-credentials: false
+ sparse-checkout: .github/actions/paths-filter
+ sparse-checkout-cone-mode: false
+
# Own rate-limit bucket; the shared GITHUB_TOKEN goes hot at merge peaks.
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
id: app-token
@@ -54,10 +62,9 @@ jobs:
- name: Detect relevant changes
id: filter
if: github.event_name == 'pull_request'
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
+ uses: ./.github/actions/paths-filter
with:
token: ${{ steps.app-token.outputs.token || github.token }}
- predicate-quantifier: every
filters: |
# Wider excludes than desktop-quality.yml, which keeps .vscode and
# .claude in scope because Biome lints them. Only documentation
diff --git a/.github/workflows/desktop-ci.yml b/.github/workflows/desktop-ci.yml
index 7fe4215b9fb5..304999733719 100644
--- a/.github/workflows/desktop-ci.yml
+++ b/.github/workflows/desktop-ci.yml
@@ -35,6 +35,7 @@ jobs:
timeout-minutes: 5
if: github.event_name == 'pull_request'
permissions:
+ contents: read
pull-requests: read
outputs:
build: ${{ steps.filter.outputs.agent == 'true' || steps.filter.outputs.code == 'true' || steps.filter.outputs.build == 'true' }}
@@ -43,6 +44,13 @@ jobs:
test: ${{ steps.filter.outputs.agent == 'true' || steps.filter.outputs.code == 'true' || steps.filter.outputs.test == 'true' }}
test_e2e: ${{ steps.filter.outputs.agent == 'true' || steps.filter.outputs.packages == 'true' || steps.filter.outputs.test == 'true' }}
steps:
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ if: github.event_name == 'pull_request'
+ with:
+ persist-credentials: false
+ sparse-checkout: .github/actions/paths-filter
+ sparse-checkout-cone-mode: false
+
# Own rate-limit bucket; the shared GITHUB_TOKEN goes hot at merge peaks.
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
id: app-token
@@ -55,10 +63,9 @@ jobs:
- name: Detect relevant changes
id: filter
if: github.event_name == 'pull_request'
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
+ uses: ./.github/actions/paths-filter
with:
token: ${{ steps.app-token.outputs.token || github.token }}
- predicate-quantifier: every
filters: |
# Wider excludes than desktop-quality.yml, which keeps .vscode and
# .claude in scope because Biome lints them. Only documentation
diff --git a/.github/workflows/desktop-quality.yml b/.github/workflows/desktop-quality.yml
index 0c8506508c79..c7fabace87cc 100644
--- a/.github/workflows/desktop-quality.yml
+++ b/.github/workflows/desktop-quality.yml
@@ -30,6 +30,7 @@ jobs:
timeout-minutes: 5
if: github.event_name != 'merge_group' && inputs.run-suite == ''
permissions:
+ contents: read
pull-requests: read
outputs:
# On master pushes the filter step is skipped and everything runs.
@@ -37,6 +38,13 @@ jobs:
code: ${{ steps.filter.outputs.agent == 'true' && 'true' || steps.filter.outputs.code || 'true' }}
workflow: ${{ steps.filter.outputs.workflow || 'true' }}
steps:
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ if: github.event_name == 'pull_request'
+ with:
+ persist-credentials: false
+ sparse-checkout: .github/actions/paths-filter
+ sparse-checkout-cone-mode: false
+
# Own rate-limit bucket; the shared GITHUB_TOKEN goes hot at merge peaks.
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
id: app-token
@@ -49,10 +57,9 @@ jobs:
- name: Detect relevant changes
id: filter
if: github.event_name == 'pull_request'
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
+ uses: ./.github/actions/paths-filter
with:
token: ${{ steps.app-token.outputs.token || github.token }}
- predicate-quantifier: every
filters: |
# Biome lints tracked JSON in .vscode/.claude, so only workflow YAML and
# documentation markdown are ignored: the app loads markdown under src/ at runtime.
diff --git a/.github/workflows/desktop-test.yml b/.github/workflows/desktop-test.yml
index 6e4c0cadc8ca..a774abc90611 100644
--- a/.github/workflows/desktop-test.yml
+++ b/.github/workflows/desktop-test.yml
@@ -43,6 +43,7 @@ jobs:
timeout-minutes: 5
if: github.event_name != 'merge_group' && inputs.run-suite == ''
permissions:
+ contents: read
pull-requests: read
outputs:
# On master pushes the filter step is skipped and everything runs.
@@ -51,6 +52,13 @@ jobs:
workflow: ${{ steps.filter.outputs.workflow || 'true' }}
packages: ${{ steps.filter.outputs.agent == 'true' && 'true' || steps.filter.outputs.packages }}
steps:
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ if: github.event_name == 'pull_request'
+ with:
+ persist-credentials: false
+ sparse-checkout: .github/actions/paths-filter
+ sparse-checkout-cone-mode: false
+
# Own rate-limit bucket; the shared GITHUB_TOKEN goes hot at merge peaks.
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
id: app-token
@@ -63,10 +71,9 @@ jobs:
- name: Detect relevant changes
id: filter
if: github.event_name == 'pull_request'
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
+ uses: ./.github/actions/paths-filter
with:
token: ${{ steps.app-token.outputs.token || github.token }}
- predicate-quantifier: every
filters: |
# Wider excludes than desktop-quality.yml, which keeps .vscode and
# .claude in scope because Biome lints them. Only documentation
diff --git a/.github/workflows/desktop-typecheck.yml b/.github/workflows/desktop-typecheck.yml
index b88c68ba9096..50ca1c769898 100644
--- a/.github/workflows/desktop-typecheck.yml
+++ b/.github/workflows/desktop-typecheck.yml
@@ -35,6 +35,7 @@ jobs:
timeout-minutes: 5
if: github.event_name != 'merge_group' && inputs.run-suite == ''
permissions:
+ contents: read
pull-requests: read
outputs:
# On master pushes the filter step is skipped and everything runs.
@@ -42,6 +43,13 @@ jobs:
code: ${{ steps.filter.outputs.agent == 'true' && 'true' || steps.filter.outputs.code || 'true' }}
workflow: ${{ steps.filter.outputs.workflow || 'true' }}
steps:
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ if: github.event_name == 'pull_request'
+ with:
+ persist-credentials: false
+ sparse-checkout: .github/actions/paths-filter
+ sparse-checkout-cone-mode: false
+
# Own rate-limit bucket; the shared GITHUB_TOKEN goes hot at merge peaks.
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
id: app-token
@@ -54,10 +62,9 @@ jobs:
- name: Detect relevant changes
id: filter
if: github.event_name == 'pull_request'
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
+ uses: ./.github/actions/paths-filter
with:
token: ${{ steps.app-token.outputs.token || github.token }}
- predicate-quantifier: every
filters: |
# Wider excludes than desktop-quality.yml, which keeps .vscode and
# .claude in scope because Biome lints them. Only documentation