MCPcopy
hub / github.com/lingodotdev/lingo.dev / getCIOrgId

Function getCIOrgId

packages/cli/src/cli/utils/org-id.ts:27–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25}
26
27function getCIOrgId(): string | null {
28 if (process.env.GITHUB_REPOSITORY) {
29 const org = extractOrg(process.env.GITHUB_REPOSITORY);
30 if (org) return `github:${org}`;
31 }
32
33 if (process.env.CI_PROJECT_PATH) {
34 const org = extractOrg(process.env.CI_PROJECT_PATH);
35 if (org) return `gitlab:${org}`;
36 }
37
38 if (process.env.BITBUCKET_REPO_FULL_NAME) {
39 const org = extractOrg(process.env.BITBUCKET_REPO_FULL_NAME);
40 if (org) return `bitbucket:${org}`;
41 }
42
43 return null;
44}
45
46function getGitOrgId(): string | null {
47 if (cachedGitOrgId !== undefined) {

Callers 1

getOrgIdFunction · 0.70

Calls 1

extractOrgFunction · 0.70

Tested by

no test coverage detected