(
git: AuthenticatedGitClient,
config: {caretaker: CaretakerConfig; github: GithubConfig},
)
| 23 | |
| 24 | export 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 |
no test coverage detected