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

Function getCommitsInRange

ng-dev/commit-message/utils.ts:19–32  ·  view source on GitHub ↗
(
  from: string,
  to: string = 'HEAD',
)

Source from the content-addressed store, hash-verified

17 * Find all commits within the given range and return an object describing those.
18 */
19export async function getCommitsInRange(
20 from: string,
21 to: string = 'HEAD',
22): Promise<CommitFromGitLog[]> {
23 gitClient ??= new GitClient(determineRepoBaseDirFromCwd());
24
25 const commits: CommitFromGitLog[] = [];
26
27 for await (const commit of gitClient.getRawCommits({from, to, format: gitLogFormatForParsing})) {
28 commits.push(parseCommitFromGitLog(commit));
29 }
30
31 return commits;
32}

Callers 2

validateCommitRangeFunction · 0.85
rebasePrFunction · 0.85

Calls 3

parseCommitFromGitLogFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected