An open source design system that's fully customizable and agent ready
TypeScript
ci: allow design owners to merge CLI template changes (#1117)
Cindy Zhang8d9270a0f63c
diff --git a/.github/DESIGNOWNERS b/.github/DESIGNOWNERSindex d8b6ff0ead..2bdfd1fb08 100644--- a/.github/DESIGNOWNERS+++ b/.github/DESIGNOWNERS@@ -1,10 +1,10 @@# Design owners for the XDS repository#-# Design owners can merge changes to sandbox and storybook apps-# without code owner approval. This lets designers iterate freely-# on stories, demos, and visual explorations.+# Design owners can merge changes to sandbox apps, storybook stories,+# and CLI templates without code owner approval. This lets designers+# iterate freely on stories, demos, visual explorations, and templates.#-# Code owners still review everything else (core, CLI, infra, CI).+# Code owners still review everything else (core, CLI logic, infra, CI).## Format: one GitHub username per line (same as CODEOWNERS convention)diff --git a/.github/workflows/codeowner-gate.yml b/.github/workflows/codeowner-gate.ymlindex aaba0af52b..1a28a407fa 100644--- a/.github/workflows/codeowner-gate.yml+++ b/.github/workflows/codeowner-gate.yml@@ -1,8 +1,9 @@# Code owner gate: blocks merge unless a code owner has approved# Code owners themselves can merge freely (auto-pass)#-# Design owners (.github/DESIGNOWNERS) can merge sandbox/storybook-# changes without code owner approval. Everyone else needs it.+# Design owners (.github/DESIGNOWNERS) can merge sandbox, storybook,+# and CLI template changes without code owner approval. Everyone else+# needs it.## Uses the Checks API to write a single "Code Owner Gate" status per# commit SHA, so re-runs from pull_request_review events UPDATE the@@ -58,6 +59,7 @@ jobs:const DESIGN_PATHS = ['apps/sandbox/','apps/storybook/',+ 'packages/cli/templates/',];// --- Resolve PR context ---@@ -94,7 +96,7 @@ jobs:summary = `@${prAuthor} is a code owner — approved automatically.`;} else if (onlyDesignPaths && DESIGNOWNERS.includes(prAuthor)) {conclusion = 'success';- summary = `@${prAuthor} is a design owner and only sandbox/storybook files changed — approved automatically.\nFiles: ${changedFiles.join(', ')}`;+ summary = `@${prAuthor} is a design owner and only design-owned paths changed — approved automatically.\nFiles: ${changedFiles.join(', ')}`;} else {// Check for code owner approvalconst { data: reviews } = await github.rest.pulls.listReviews({@@ -118,7 +120,7 @@ jobs:} else {// Tailor the message based on contextif (onlyDesignPaths && !DESIGNOWNERS.includes(prAuthor)) {- summary = `@${prAuthor} is not a design owner. Sandbox/storybook changes require code owner approval (${CODE_OWNERS.map(u => '@' + u).join(', ')}) or being listed in .github/DESIGNOWNERS.`;+ summary = `@${prAuthor} is not a design owner. These paths require code owner approval (${CODE_OWNERS.map(u => '@' + u).join(', ')}) or being listed in .github/DESIGNOWNERS.`;} else {summary = `Requires approval from a code owner (${CODE_OWNERS.map(u => '@' + u).join(', ')}).`;}