MCPcopy Create free account
hub / github.com/angular/dev-infra / getCurrentGitUser

Function getCurrentGitUser

ng-dev/release/stamping/env-stamp.ts:122–130  ·  view source on GitHub ↗

Get the current git user based on the git config.

(git: GitClient)

Source from the content-addressed store, hash-verified

120
121/** Get the current git user based on the git config. */
122function getCurrentGitUser(git: GitClient) {
123 try {
124 let userName = git.runGraceful(['config', 'user.name']).stdout.trim() || 'Unknown User';
125 let userEmail = git.runGraceful(['config', 'user.email']).stdout.trim() || 'unknown_email';
126 return `${userName} <${userEmail}>`;
127 } catch {
128 return '';
129 }
130}
131
132/** Gets the `version` from the workspace top-level `package.json` file. */
133function getVersionFromWorkspacePackageJson(git: GitClient): semver.SemVer {

Callers 1

printEnvStampFunction · 0.85

Calls 1

runGracefulMethod · 0.45

Tested by

no test coverage detected