Update scan_github_repos.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Alexa Amundson
2025-11-24 04:54:49 -06:00
committed by GitHub
parent e5f00cca96
commit d1271beab3

View File

@@ -53,7 +53,15 @@ async function fetchReposForOrg(org: string): Promise<RepoRecord[]> {
if (!data.length) break; if (!data.length) break;
data.forEach((repo) => { data.forEach((repo) => {
const id = repo.name.replace(/^blackroad-os-/, ""); let id: string;
if (repo.name.startsWith("blackroad-os-")) {
id = repo.name.replace(/^blackroad-os-/, "");
} else {
id = `other-${repo.name}`;
console.warn(
`Repository '${repo.full_name}' does not start with 'blackroad-os-'. Assigned id: '${id}'.`
);
}
repos.push({ repos.push({
id, id,
full_name: repo.full_name, full_name: repo.full_name,