From 0d4240f1667db0a7e9ae732b8e54cce37b2c2c36 Mon Sep 17 00:00:00 2001 From: Nathan Arthur Date: Thu, 30 Apr 2026 10:04:59 -0400 Subject: [PATCH] ci: scope push trigger to master, drop fork gating Previously every job had `if: github.event_name == 'push' || github.event.pull_request.head.repo.fork` to avoid duplicate runs (push + PR both firing on feature branches). That gate skipped CI entirely for same-repo PRs from bot-authored branches (e.g. chore/update-snapshots), since their pull_request event has head.repo.fork == false and no push event ever fires (GITHUB_TOKEN pushes don't trigger downstream workflows). Scoping the push trigger to master is the canonical fix: - Pushes to feature branches: no push event, only pull_request runs CI. No duplicate. - Pushes to master (post-merge): push event runs CI. No PR exists. - Forks and bot-authored same-repo PRs: pull_request runs CI normally. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yaml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0265004f..ccd45ec7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,7 @@ name: CI on: push: + branches: [master] pull_request: env: NODE_VERSION: "22" @@ -8,7 +9,6 @@ env: ETHERPAD_DOMAIN: "${{ secrets.ETHERPAD_DOMAIN }}" jobs: test: - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -25,7 +25,6 @@ jobs: - name: Test run: pnpm test test-snapshot: - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -42,7 +41,6 @@ jobs: - name: Test run: pnpm test:snapshot build: - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -59,7 +57,6 @@ jobs: - name: Build run: pnpm run build check: - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -76,7 +73,6 @@ jobs: - name: Check run: pnpm run check typescript: - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -93,7 +89,6 @@ jobs: - name: Check types run: pnpm run check:ts lint: - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -110,7 +105,6 @@ jobs: - name: Run eslint run: pnpm run lint formatting: - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -127,7 +121,6 @@ jobs: - name: Check formatting run: pnpm prettier --check . outdated: - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -144,7 +137,6 @@ jobs: - name: Check outdated run: pnpm outdated knip: - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork runs-on: ubuntu-latest steps: - uses: actions/checkout@v4