Skip to content

Commit 3441c58

Browse files
authoredJan 9, 2025
fix: remove react-based-templates because it doesn't work (#6993)
1 parent 9b8a0c9 commit 3441c58

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed
 

‎src/utils/sites/create-template.ts

+10-7
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@ import { getTemplatesFromGitHub } from './utils.js'
1111
export const fetchTemplates = async (token: string): Promise<Template[]> => {
1212
const templatesFromGitHubOrg: GitHubRepo[] = await getTemplatesFromGitHub(token)
1313

14-
return templatesFromGitHubOrg
15-
.filter((repo: GitHubRepo) => !repo.archived && !repo.disabled)
16-
.map((template: GitHubRepo) => ({
17-
name: template.name,
18-
sourceCodeUrl: template.html_url,
19-
slug: template.full_name,
20-
}))
14+
return (
15+
templatesFromGitHubOrg
16+
// adding this filter because the react-based-templates has multiple templates in one repo so doesn't work for this command
17+
.filter((repo: GitHubRepo) => !repo.archived && !repo.disabled && repo.name !== 'react-based-templates')
18+
.map((template: GitHubRepo) => ({
19+
name: template.name,
20+
sourceCodeUrl: template.html_url,
21+
slug: template.full_name,
22+
}))
23+
)
2124
}
2225

2326
export const getTemplateName = async ({

0 commit comments

Comments
 (0)