Skip to content

getProviderVersionTags

typescript
import { getProviderVersionTags } from '@seontechnologies/pactjs-utils'

Generates an array of tags to associate with the provider version during verification. Tags are used by the Pact Broker for version tracking and webhook routing.

typescript
const tags = getProviderVersionTags()

Behavior

EnvironmentPACT_BREAKING_CHANGEGITHUB_BRANCHResult
Local (not CI)anyany['local']
CIunset or 'false'unset['dev']
CIunset or 'false''feature/foo'['dev', 'feature/foo']
CI'true'unset[]
CI'true''feature/foo'['feature/foo']

Key detail: When PACT_BREAKING_CHANGE is 'true', the 'dev' tag is excluded. This prevents the Pact Broker from treating the breaking provider version as a deployable candidate while the consumer is still catching up.

CI detection uses the is-ci package.

Released under the MIT License.