fix(custom-widgets): address v2 merge review (#6446)

This commit is contained in:
Thomas authored and ajnart committed 2026-08-13 19:49:25 +02:00
1 parent acdfcbb18e
commit 3aa14e22ed
123 files changed
+10348 -931

No files matched your search

+1 -1
View File
@@ -32,4 +32,4 @@ jobs:
run: |
git diff --name-only --diff-filter=ACMR -z "origin/${BASE_REF}...HEAD" -- \
'*.css' '*.js' '*.json' '*.jsonc' '*.jsx' '*.md' '*.mdx' '*.scss' '*.ts' '*.tsx' '*.yaml' '*.yml' \
| xargs -0 -r pnpm exec oxfmt --check
| xargs -0 -r pnpm exec oxfmt --check --
+35 -2
View File
@@ -8,7 +8,7 @@ on:
types: [closed]
branches: ["*"]
push:
branches: [main, dev, beta, next]
branches: [main, dev, beta, next, v2]
merge_group:
workflow_dispatch:
inputs:
@@ -87,6 +87,17 @@ jobs:
- name: Validate workspace configuration
run: pnpm lint:ws
- name: Validate Custom Widget architecture
run: pnpm check:custom-widgets
- name: Validate checked-in OpenAPI schema
run: pnpm check:openapi
- name: Validate Custom Widget bundle budget
run: |
pnpm --filter nextjs build
pnpm check:custom-widget-bundle
- name: Run unit tests
run: pnpm test
@@ -229,7 +240,7 @@ jobs:
needs: fast-gate
if: |
(
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'pull_request' && github.event.pull_request.draft == false && github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'workflow_dispatch' && inputs.operation == 'publish')
)
runs-on: ubuntu-24.04-arm
@@ -286,7 +297,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
packages: write
pull-requests: read
env:
PREVIEW_TAG: pr-${{ github.event.pull_request.number || inputs.pr_number }}
steps:
@@ -302,6 +315,26 @@ jobs:
if: "!env.ACT"
uses: docker/setup-buildx-action@v4
- name: Verify PR head before publication
if: github.event_name == 'pull_request'
uses: actions/github-script@v8
env:
EXPECTED_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
with:
script: |
const { data: pull } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
});
if (pull.state !== "open") {
core.setFailed(`PR #${pull.number} is ${pull.state}; refusing to publish its preview.`);
return;
}
if (pull.head.sha !== process.env.EXPECTED_HEAD_SHA) {
core.setFailed(`PR #${pull.number} moved from ${process.env.EXPECTED_HEAD_SHA} to ${pull.head.sha}.`);
}
- name: Publish preview manifest
if: "!env.ACT"
env:
-14
View File
@@ -2,22 +2,8 @@ name: Workshop
on:
pull_request:
paths:
- "apps/workshop/**"
- "apps/docs/**"
- "packages/workshop/**"
- "packages/custom-widgets/**"
- "pnpm-lock.yaml"
- ".github/workflows/workshop.yml"
push:
branches: [dev, v2]
paths:
- "apps/workshop/**"
- "apps/docs/**"
- "packages/workshop/**"
- "packages/custom-widgets/**"
- "pnpm-lock.yaml"
- ".github/workflows/workshop.yml"
permissions:
contents: read