feat: workspace source-of-truth hard cut
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
export function projectDisplayNameFromProjectId(projectId: string): string {
|
||||
const githubRemotePrefix = "remote:github.com/";
|
||||
if (projectId.startsWith(githubRemotePrefix)) {
|
||||
return projectId.slice(githubRemotePrefix.length) || projectId;
|
||||
}
|
||||
|
||||
const segments = projectId.split(/[\\/]/).filter(Boolean);
|
||||
return segments[segments.length - 1] || projectId;
|
||||
}
|
||||
Reference in New Issue
Block a user