MCPcopy
hub / github.com/larksuite/cli / getBusinessDomain

Function getBusinessDomain

scripts/pr-labels/index.js:287–295  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

285
286// Get business domain label based on CODEOWNERS path mapping
287function getBusinessDomain(filePath) {
288 const normalized = normalizePath(filePath);
289 for (const [prefix, domain] of Object.entries(PATH_TO_DOMAIN_MAP)) {
290 if (normalized.startsWith(prefix)) {
291 return domain;
292 }
293 }
294 return "";
295}
296
297async function detectNewShortcutDomain(files) {
298 for (const item of files) {

Callers 1

classifyPrFunction · 0.85

Calls 1

normalizePathFunction · 0.85

Tested by

no test coverage detected