Repository navigation
ci: merge-queue triggers, compile check, grouped Dependabot, serial deploys #3711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
942218f
6dd7d73
292736f
c548658
1ddc5e2
2929ed9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,12 +42,14 @@ | |
| name: PR Gate | ||
|
|
||
| on: | ||
| merge_group: | ||
| types: [checks_requested] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| concurrency: | ||
| group: pr-gate-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: true | ||
| group: pr-gate-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
|
||
| permissions: {} | ||
|
|
||
|
|
@@ -67,8 +69,8 @@ jobs: | |
| - name: Detect backend-relevant changes | ||
| id: detect | ||
| env: | ||
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
| HEAD_SHA: ${{ github.event.pull_request.head.sha }} | ||
| BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }} | ||
| HEAD_SHA: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} | ||
| run: | | ||
| python3 - <<'PY' >> "$GITHUB_OUTPUT" | ||
| import os, subprocess | ||
|
|
@@ -110,7 +112,7 @@ jobs: | |
| if: steps.detect.outputs.changed == 'true' | ||
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 | ||
| env: | ||
| HEAD_SHA: ${{ github.event.pull_request.head.sha }} | ||
| HEAD_SHA: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} | ||
|
PetrefiedThunder marked this conversation as resolved.
Resolved
|
||
| CHECK_NAME: "Backend CI Status Gate" | ||
| with: | ||
| github-token: ${{ github.token }} | ||
|
|
@@ -225,7 +227,7 @@ jobs: | |
| repo, | ||
| workflow_id: 'backend-ci.yml', | ||
| head_sha: sha, | ||
| event: 'pull_request', | ||
| event: context.eventName, | ||
| per_page: 20, | ||
| }) | ||
| ); | ||
|
|
@@ -271,12 +273,13 @@ jobs: | |
| actions: read | ||
| name: "PR Gate: Frontend" | ||
| runs-on: ubuntu-latest | ||
| # Short bound: when the runner queue is backed up the Status Gate may not | ||
|
PetrefiedThunder marked this conversation as resolved.
Resolved
|
||
| # Short PR bound: when the runner queue is backed up the Status Gate may not | ||
| # exist yet. pr-gate-frontend-rerun.yml re-runs this job when Frontend | ||
| # CI/CD completes, so a timeout here is recovered automatically. | ||
| timeout-minutes: 15 | ||
| # Merge groups cannot use the PR-only rerun helper, so wait for real CI. | ||
| timeout-minutes: ${{ github.event_name == 'merge_group' && 150 || 15 }} | ||
| concurrency: | ||
| group: pr-gate-frontend-${{ github.event.pull_request.number }} | ||
| group: pr-gate-frontend-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6 | ||
|
|
@@ -285,8 +288,8 @@ jobs: | |
| - name: Detect frontend-relevant changes | ||
| id: detect | ||
| env: | ||
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
| HEAD_SHA: ${{ github.event.pull_request.head.sha }} | ||
| BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }} | ||
| HEAD_SHA: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} | ||
| run: | | ||
| python3 - <<'PY' >> "$GITHUB_OUTPUT" | ||
| import os, subprocess | ||
|
|
@@ -334,20 +337,22 @@ jobs: | |
| if: steps.detect.outputs.changed == 'true' | ||
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 | ||
| env: | ||
| HEAD_SHA: ${{ github.event.pull_request.head.sha }} | ||
| HEAD_SHA: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} | ||
| CHECK_NAME: "Frontend CI Status Gate" | ||
| with: | ||
| github-token: ${{ github.token }} | ||
| # "Frontend CI Status Gate" is created only after earlier frontend | ||
| # jobs finish. A gate that is missing or still queued is pending, not | ||
| # failed: we poll up to 12 minutes, then fail with an explicit | ||
| # failed: PRs poll up to 12 minutes (merge groups: 140), then fail with an explicit | ||
| # "still pending" message. pr-gate-frontend-rerun.yml re-runs this job | ||
| # once Frontend CI/CD completes, which then mirrors the real result. | ||
| script: | | ||
| const { owner, repo } = context.repo; | ||
| const sha = process.env.HEAD_SHA; | ||
| const CHECK_NAME = process.env.CHECK_NAME; | ||
| const deadline = Date.now() + 12 * 60 * 1000; | ||
| // Merge groups have no PR metadata for the rerun helper. | ||
| const waitMinutes = context.eventName === 'merge_group' ? 140 : 12; | ||
| const deadline = Date.now() + waitMinutes * 60 * 1000; | ||
| const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); | ||
|
|
||
| const callWithRetry = async (fn) => { | ||
|
|
@@ -466,9 +471,8 @@ jobs: | |
| } | ||
|
|
||
| core.setFailed( | ||
| `${CHECK_NAME} is still pending (not created yet or queued) after 12 minutes; ` + | ||
| `this is a CI queue delay, not a frontend failure. This job is re-run ` + | ||
| `automatically when Frontend CI/CD completes (pr-gate-frontend-rerun.yml).` | ||
| `${CHECK_NAME} is still pending (not created yet or queued) after ${waitMinutes} minutes; ` + | ||
| `inspect the Frontend CI/CD run for this SHA.` | ||
| ); | ||
| - name: No frontend-relevant changes | ||
| if: steps.detect.outputs.changed != 'true' | ||
|
|
@@ -522,7 +526,7 @@ jobs: | |
| gitleaks version | ||
| - name: Scan PR commits with gitleaks | ||
| env: | ||
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
| BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }} | ||
| run: | | ||
| gitleaks detect \ | ||
| --source . \ | ||
|
|
@@ -572,6 +576,7 @@ jobs: | |
|
|
||
| # Shared PR file detection. Required gate jobs above remain unconditional. | ||
| changes: | ||
| if: github.event_name == 'pull_request' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Merge queue fails required status gateHigh Severity Skipping Additional Locations (1)Reviewed by Cursor Bugbot for commit 2929ed9. Configure here. |
||
| name: "PR Gate: Path Detection" | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
|
|
@@ -630,6 +635,7 @@ jobs: | |
| # Jobs migrated from PR Quality Gate. | ||
| # ── PR Size Check ─────────────────────────────────────── | ||
| pr-size: | ||
| if: github.event_name == 'pull_request' | ||
| needs: changes | ||
| permissions: | ||
| contents: read | ||
|
|
@@ -671,6 +677,7 @@ jobs: | |
| # ── Conventional Commits ──────────────────────────────── | ||
|
|
||
| commit-lint: | ||
| if: github.event_name == 'pull_request' | ||
| needs: changes | ||
| permissions: | ||
| contents: read | ||
|
|
@@ -720,6 +727,7 @@ jobs: | |
| # ── Copy Lint: Ban A-F Grade / Verdict UIs in /tools ──── | ||
|
|
||
| copy-lint-tools-grade-verdicts: | ||
| if: github.event_name == 'pull_request' | ||
| needs: changes | ||
| permissions: | ||
| contents: read | ||
|
|
@@ -761,6 +769,7 @@ jobs: | |
| # ── Label PR ──────────────────────────────────────────── | ||
|
|
||
| label: | ||
| if: github.event_name == 'pull_request' | ||
| needs: changes | ||
| permissions: | ||
| contents: read | ||
|
|
@@ -789,6 +798,7 @@ jobs: | |
| # ────────────────────────────────────────────── | ||
|
|
||
| supabase-patterns: | ||
| if: github.event_name == 'pull_request' | ||
| needs: changes | ||
| permissions: | ||
| contents: read | ||
|
|
@@ -849,6 +859,7 @@ jobs: | |
| # ────────────────────────────────────────────── | ||
|
|
||
| source-hygiene: | ||
| if: github.event_name == 'pull_request' | ||
| needs: changes | ||
| permissions: | ||
| contents: read | ||
|
|
@@ -913,6 +924,7 @@ jobs: | |
| # ────────────────────────────────────────────── | ||
|
|
||
| audit-trail: | ||
| if: github.event_name == 'pull_request' | ||
| needs: changes | ||
| permissions: | ||
| contents: read | ||
|
|
@@ -1014,6 +1026,7 @@ jobs: | |
| # ────────────────────────────────────────────── | ||
|
|
||
| sql-safety: | ||
| if: github.event_name == 'pull_request' | ||
| needs: changes | ||
| permissions: | ||
| contents: read | ||
|
|
@@ -1047,6 +1060,7 @@ jobs: | |
| # ────────────────────────────────────────────── | ||
|
|
||
| tenant-isolation: | ||
| if: github.event_name == 'pull_request' | ||
| needs: changes | ||
| permissions: | ||
| contents: read | ||
|
|
@@ -1121,6 +1135,7 @@ jobs: | |
| # ────────────────────────────────────────────── | ||
|
|
||
| react-patterns: | ||
| if: github.event_name == 'pull_request' | ||
| needs: changes | ||
| permissions: | ||
| contents: read | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.