Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConsumerVersionSelectors interface does support fallbackBranch (which is defined in document) #1418

Open
samer-lahlouh opened this issue Mar 20, 2025 · 1 comment
Labels
awaiting feedback Awaiting Feedback from OP enhancement Indicates new feature requests triage This issue is yet to be triaged by a maintainer

Comments

@samer-lahlouh
Copy link

Expected behaviour
Can set up like this

const verificationOptions = {
  //...
  consumerVersionSelectors: [
    {
      matchingBranch: true,
      fallbackBranch: "main"
    }
  ]
}

Actual behaviour

Image

Steps to reproduce
I checked code base here https://github.com/pact-foundation/pact-js-core/blob/master/src/verifier/types.ts#L3

export interface ConsumerVersionSelector {
  tag?: string;
  latest?: boolean;
  consumer?: string;
  deployedOrReleased?: boolean;
  deployed?: boolean;
  released?: boolean;
  environment?: string;
  fallbackTag?: string;
  branch?: string;
  mainBranch?: boolean;
  matchingBranch?: boolean;
}

It does not match the document https://docs.pact.io/pact_broker/advanced_topics/consumer_version_selectors#properties

@samer-lahlouh samer-lahlouh added bug Indicates an unexpected problem or unintended behavior triage This issue is yet to be triaged by a maintainer labels Mar 20, 2025
@mefellows
Copy link
Member

Thanks. You can always force-add properties to that type, but I appreciate that's not nice.

Would you be open to a PR? It should be relatively straightforward to add this support.

@mefellows mefellows added awaiting feedback Awaiting Feedback from OP enhancement Indicates new feature requests and removed bug Indicates an unexpected problem or unintended behavior labels Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback Awaiting Feedback from OP enhancement Indicates new feature requests triage This issue is yet to be triaged by a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants