Home / Function/ getProjectIdFromGit() — astro Function Reference

getProjectIdFromGit() — astro Function Reference

Architecture documentation for the getProjectIdFromGit() function in project-info.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  5c2d8c4c_8ff6_7c02_7910_ae42a7028d3b["getProjectIdFromGit()"]
  5cf28cbb_df91_06e4_faa2_0ea2eb5a9a37["project-info.ts"]
  5c2d8c4c_8ff6_7c02_7910_ae42a7028d3b -->|defined in| 5cf28cbb_df91_06e4_faa2_0ea2eb5a9a37
  e0969f5b_2c7e_7882_c1aa_903356b2865a["getProjectId()"]
  e0969f5b_2c7e_7882_c1aa_903356b2865a -->|calls| 5c2d8c4c_8ff6_7c02_7910_ae42a7028d3b
  style 5c2d8c4c_8ff6_7c02_7910_ae42a7028d3b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/telemetry/src/project-info.ts lines 71–81

function getProjectIdFromGit(): string | null {
	try {
		const originBuffer = execSync(`git rev-list --max-parents=0 HEAD`, {
			timeout: 500,
			stdio: ['ignore', 'pipe', 'ignore'],
		});
		return String(originBuffer).trim();
	} catch (_) {
		return null;
	}
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does getProjectIdFromGit() do?
getProjectIdFromGit() is a function in the astro codebase, defined in packages/telemetry/src/project-info.ts.
Where is getProjectIdFromGit() defined?
getProjectIdFromGit() is defined in packages/telemetry/src/project-info.ts at line 71.
What calls getProjectIdFromGit()?
getProjectIdFromGit() is called by 1 function(s): getProjectId.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free