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

Method get

ng-dev/utils/git/git-client.ts:237–248  ·  view source on GitHub ↗

* Static method to get the singleton instance of the `GitClient`, * creating it, if not created yet.

()

Source from the content-addressed store, hash-verified

235 * creating it, if not created yet.
236 */
237 static async get(): Promise<GitClient> {
238 // If there is no cached instance, create one and cache the promise immediately.
239 // This avoids constructing a client twice accidentally when e.g. waiting for the
240 // configuration to be loaded.
241 if (GitClient._unauthenticatedInstance === null) {
242 GitClient._unauthenticatedInstance = (async () => {
243 return new GitClient(await getConfig([assertValidGithubConfig]));
244 })();
245 }
246
247 return GitClient._unauthenticatedInstance;
248 }
249}
250
251/**

Callers 15

validateFileFunction · 0.45
getFunction · 0.45
getCurrentMergeModeFunction · 0.45
setRepoMergeModeFunction · 0.45
g3.spec.tsFile · 0.45
expectBranchRequestMethod · 0.45
getShaForCommitIdMethod · 0.45

Calls 1

getConfigFunction · 0.85