From a0dc2626694d164f921b537f2982b9fab67ce648 Mon Sep 17 00:00:00 2001 From: Sil Veltman Date: Wed, 14 Oct 2026 20:19:30 +0200 Subject: [PATCH 1/3] ci: use shared Ready checks and merge policy --- .github/workflows/check.yml | 18 ++++++++++++++++ .github/workflows/ci.yml | 11 ++-------- .github/workflows/ready.yml | 33 ++++++++++++++++++++++++++++++ .github/workflows/review-event.yml | 14 +++++++++++++ .node-version | 1 + netlify.toml | 6 ++++++ 6 files changed, 74 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/check.yml create mode 100644 .github/workflows/ready.yml create mode 100644 .github/workflows/review-event.yml create mode 100644 .node-version diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..4a6090f --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,18 @@ +name: Check + +on: + pull_request: + branches: [main] + types: [opened, synchronize, reopened, ready_for_review, converted_to_draft] + +permissions: + contents: read + +concurrency: + group: check-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + check: + name: Check + uses: fulldotdev/.github/.github/workflows/check.yml@288d0a18bdcc83e2376c91f557577f0dfe4d1e56 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bdb6096..1e3a795 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,8 +3,7 @@ name: CI on: pull_request: branches: [main] - push: - branches: [main] + types: [opened, synchronize, reopened, ready_for_review, converted_to_draft] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -21,8 +20,7 @@ env: jobs: validate: name: Validate - # On release pull requests both checks below are skipped, so skip the job; the organization Check still runs. - if: ${{ !startsWith(github.head_ref, 'changeset-release/') }} + if: ${{ !github.event.pull_request.draft && !startsWith(github.head_ref, 'changeset-release/') }} runs-on: ubuntu-latest steps: @@ -49,8 +47,3 @@ jobs: - name: Check changeset if: github.event_name == 'pull_request' && !startsWith(github.head_ref, 'changeset-release/') run: pnpm exec changeset status --since=origin/${{ github.event.pull_request.base.ref }} - - # On pull requests the required organization Check runs pnpm check. - - name: Check code - if: github.event_name == 'push' - run: pnpm check diff --git a/.github/workflows/ready.yml b/.github/workflows/ready.yml new file mode 100644 index 0000000..d08ee0a --- /dev/null +++ b/.github/workflows/ready.yml @@ -0,0 +1,33 @@ +name: Ready + +on: + pull_request_target: + branches: [main] + types: + [ + opened, + synchronize, + reopened, + ready_for_review, + converted_to_draft, + labeled, + unlabeled, + ] + workflow_run: + workflows: [Check, Review event] + types: [completed] + +permissions: + contents: write + pull-requests: write + statuses: write + checks: read + +jobs: + ready: + uses: fulldotdev/.github/.github/workflows/ready.yml@288d0a18bdcc83e2376c91f557577f0dfe4d1e56 + with: + netlify-checks: '["netlify/fulldev-sitex/deploy-preview"]' + merge-app-client-id: ${{ vars.RELEASE_APP_CLIENT_ID }} + secrets: + merge-app-private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} diff --git a/.github/workflows/review-event.yml b/.github/workflows/review-event.yml new file mode 100644 index 0000000..ec42697 --- /dev/null +++ b/.github/workflows/review-event.yml @@ -0,0 +1,14 @@ +name: Review event + +on: + pull_request_review: + types: [submitted, dismissed] + +permissions: {} + +jobs: + notify: + runs-on: ubuntu-latest + timeout-minutes: 1 + steps: + - run: echo "Review changed; the trusted Ready workflow will inspect GitHub metadata." diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..a45fd52 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +24 diff --git a/netlify.toml b/netlify.toml index 59c3a34..2003881 100644 --- a/netlify.toml +++ b/netlify.toml @@ -78,8 +78,14 @@ from = "/docs/ui/*" to = "/docs/components/:splat" status = 301 +[context.production] +command = "pnpm run check && pnpm build" + [[headers]] for = "/*" [headers.values] X-Content-Type-Options = "nosniff" Referrer-Policy = "strict-origin-when-cross-origin" + +[context.deploy-preview] +ignore = "false" From 4195ef98cdecbd2c5ef3c0e02351e994a2052cd7 Mon Sep 17 00:00:00 2001 From: Sil Veltman Date: Wed, 14 Oct 2026 20:57:50 +0200 Subject: [PATCH 2/3] Keep Draft runs separate and use validated Ready workflow --- .github/workflows/check.yml | 2 +- .github/workflows/ready.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 4a6090f..76299d2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -9,7 +9,7 @@ permissions: contents: read concurrency: - group: check-${{ github.event.pull_request.number }} + group: check-${{ github.event.pull_request.number }}-${{ github.event.pull_request.draft && 'draft' || 'ready' }} cancel-in-progress: true jobs: diff --git a/.github/workflows/ready.yml b/.github/workflows/ready.yml index d08ee0a..b08f7d5 100644 --- a/.github/workflows/ready.yml +++ b/.github/workflows/ready.yml @@ -25,7 +25,7 @@ permissions: jobs: ready: - uses: fulldotdev/.github/.github/workflows/ready.yml@288d0a18bdcc83e2376c91f557577f0dfe4d1e56 + uses: fulldotdev/.github/.github/workflows/ready.yml@82c066718d458f59b63bbb6634da9eb441f106aa with: netlify-checks: '["netlify/fulldev-sitex/deploy-preview"]' merge-app-client-id: ${{ vars.RELEASE_APP_CLIENT_ID }} From 395cb19a34d056c57b1f97e8ed7da42e6f41b6d0 Mon Sep 17 00:00:00 2001 From: Sil Veltman Date: Wed, 14 Oct 2026 21:30:44 +0200 Subject: [PATCH 3/3] fix: use reviewed Ready merge correction --- .github/workflows/ready.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ready.yml b/.github/workflows/ready.yml index b08f7d5..90c69e2 100644 --- a/.github/workflows/ready.yml +++ b/.github/workflows/ready.yml @@ -25,7 +25,7 @@ permissions: jobs: ready: - uses: fulldotdev/.github/.github/workflows/ready.yml@82c066718d458f59b63bbb6634da9eb441f106aa + uses: fulldotdev/.github/.github/workflows/ready.yml@579bcf444a2f964e48ecbeb580b01c921c9f1ea4 with: netlify-checks: '["netlify/fulldev-sitex/deploy-preview"]' merge-app-client-id: ${{ vars.RELEASE_APP_CLIENT_ID }}