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

Method retrieveDiffStats

ng-dev/utils/g3.ts:25–42  ·  view source on GitHub ↗
(
    git: AuthenticatedGitClient,
    config: {caretaker: CaretakerConfig; github: GithubConfig},
  )

Source from the content-addressed store, hash-verified

23
24export class G3Stats {
25 static async retrieveDiffStats(
26 git: AuthenticatedGitClient,
27 config: {caretaker: CaretakerConfig; github: GithubConfig},
28 ): Promise<G3StatsData | undefined> {
29 const syncMatchFns = await this.getG3SyncFileMatchFns(git, config);
30 const latestSha = this.getLatestShas(git);
31
32 if (
33 syncMatchFns === null ||
34 syncMatchFns.ngMatchFn === null ||
35 syncMatchFns.separateMatchFn === null ||
36 latestSha === null
37 ) {
38 return;
39 }
40
41 return this.getDiffStats(git, latestSha.g3, latestSha.main, syncMatchFns);
42 }
43
44 /**
45 * Get git diff stats between main and g3, for all files and filtered to only g3 affecting

Callers 3

g3.spec.tsFile · 0.80
retrieveDataMethod · 0.80
getDiffStatsFunction · 0.80

Calls 3

getG3SyncFileMatchFnsMethod · 0.95
getLatestShasMethod · 0.95
getDiffStatsMethod · 0.95

Tested by

no test coverage detected