(options: BranchPushMatchParameters)
| 24 | * matches the specified branch push (through the match parameters). |
| 25 | */ |
| 26 | export 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 | } |
no outgoing calls
no test coverage detected