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

Function resolveLabel

frontend/src/react/components/AccountMultiSelect.tsx:259–270  ·  view source on GitHub ↗
(fullname: string)

Source from the content-addressed store, hash-verified

257
258 // Resolve display label from current search results
259 const resolveLabel = (fullname: string): string | undefined => {
260 if (fullname.startsWith("users/")) {
261 const email = extractUserEmail(fullname);
262 const user = users.find((u) => u.email === email);
263 return user?.title || user?.email;
264 }
265 if (fullname.startsWith(groupNamePrefix)) {
266 const group = groups.find((g) => g.name === fullname);
267 return group?.title || fullname;
268 }
269 return undefined;
270 };
271
272 // Detect service account / workload identity typed in search
273 const specialAccountMatch = useMemo((): {

Callers 2

toggleFunction · 0.70
chipLabelFunction · 0.70

Calls 1

extractUserEmailFunction · 0.90

Tested by

no test coverage detected