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

Function getBranchPushMatcher

ng-dev/utils/testing/virtual-git-matchers.ts:26–41  ·  view source on GitHub ↗
(options: BranchPushMatchParameters)

Source from the content-addressed store, hash-verified

24 * matches the specified branch push (through the match parameters).
25 */
26export function getBranchPushMatcher(options: BranchPushMatchParameters) {
27 const {targetRepo, targetBranch, baseBranch, baseRepo, expectedCommits} = options;
28 return jasmine.objectContaining({
29 remote: {
30 repoUrl: `https://x-access-token:abc123@github.com/${targetRepo.owner}/${targetRepo.name}.git`,
31 name: `refs/heads/${targetBranch}`,
32 },
33 head: jasmine.objectContaining({
34 newCommits: expectedCommits,
35 ref: {
36 repoUrl: `https://x-access-token:abc123@github.com/${baseRepo.owner}/${baseRepo.name}.git`,
37 name: baseBranch,
38 },
39 }),
40 });
41}

Calls

no outgoing calls

Tested by

no test coverage detected