Skip to content

Commit bbb2167

Browse files
authored
Fix repo-only design system intake (#5779)
1 parent 5c94dda commit bbb2167

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

apps/web/src/components/DesignSystemFlow.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,8 +913,7 @@ export function DesignSystemCreationFlow({
913913
// drives the kickoff. POST /api/brands creates the backing project and
914914
// real transcript immediately, then the programmatic pass registers a
915915
// usable user:<id> design system in the background.
916-
const extractUrl =
917-
nonGithubSourceUrlsFromState(state)[0] ?? sourceUrlsFromState(state)[0] ?? '';
916+
const extractUrl = nonGithubSourceUrlsFromState(state)[0] ?? '';
918917
const fallbackDesignMd = !extractUrl && !hasDesignMd
919918
? buildFallbackDesignMdFromState(state)
920919
: '';

apps/web/tests/components/DesignSystemFlow.test.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ describe('DesignSystemCreationFlow', () => {
406406
expect(mocks.ensureDesignSystemWorkspace).not.toHaveBeenCalled();
407407
});
408408

409-
it('normalizes GitHub SSH source links before starting extraction', async () => {
409+
it('keeps GitHub-only source links out of website brand extraction', async () => {
410410
const project: Project = {
411411
id: 'brand-github',
412412
name: 'GitHub Design System',
@@ -430,9 +430,10 @@ describe('DesignSystemCreationFlow', () => {
430430
| { body: string }
431431
| undefined;
432432
expect(requestInit).toBeTruthy();
433-
expect(JSON.parse(requestInit!.body)).toMatchObject({
434-
url: 'https://github.com/nexu-io/open-design',
435-
});
433+
const body = JSON.parse(requestInit!.body) as { url?: string; designMd?: string };
434+
expect(body.url).toBeUndefined();
435+
expect(body.designMd).toEqual(expect.stringContaining('https://github.com/nexu-io/open-design'));
436+
expect(body.designMd).toEqual(expect.stringContaining('GitHub repositories: https://github.com/nexu-io/open-design'));
436437
});
437438

438439
it('keeps protocol-less website paths as website URLs', async () => {

0 commit comments

Comments
 (0)