A provider version branch associates a Pact provider version with the Git branch that produced it. In CI/CD, the provider publishes its commit version and branch, allowing verification results to remain tied to the correct branch. section 10.2.2
Configure the provider with the GITHUB_BRANCH environment variable and select contracts from the consumer’s main branch and matching branch. This replaces consumer version tags for the workflow described here. section 10.2.2
Matching feature branches
If a consumer developer creates test-pact-features, the provider developer uses the same branch name. The provider then verifies both the matching feature-branch contract and the consumer’s main-branch contract before merging. section 10.2.2
const options = {
…
providerVersion: process.env.GITHUB_SHA,
providerVersionBranch: process.env.GITHUB_BRANCH,
consumerVersionSelectors: [
{ mainBranch: true },
{ matchingBranch: true },
]
…
}
A provider verification configuration pairs providerVersionBranch with consumerVersionSelectors for main-branch and matching-branch contract selection. section 10.2.2
