MCPcopy Create free account
hub / github.com/bytebase/bytebase / extractProjectResourceName

Function extractProjectResourceName

frontend/src/utils/v1/project.ts:4–8  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

2import type { Project } from "@/types/proto-es/v1/project_service_pb";
3
4export const extractProjectResourceName = (name: string) => {
5 const pattern = /(?:^|\/)projects\/([^/]+)(?:$|\/)/;
6 const matches = name.match(pattern);
7 return matches?.[1] ?? "";
8};
9
10export function projectV1Name(project: Project) {
11 if (isDefaultProject(project.name)) {

Callers 15

ProjectSelectFunction · 0.90
IssueTable.tsxFile · 0.90
QuickstartFunction · 0.90
DatabaseTableViewFunction · 0.90
handleSubmitFunction · 0.90
buildHistoryLinkFunction · 0.90
gotoCreateIssueFunction · 0.90
SQLEditorHomePageFunction · 0.90
syncURLFunction · 0.90
SharePopoverBodyFunction · 0.90
useSchemaPaneContextMenuFunction · 0.90
useConnectionMenuFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected