What to call the new branch(es) field on the pacticipant and should it be an array or a string? #400
Replies: 2 comments 2 replies
-
Giving this more thought. I'm going to remove |
Beta Was this translation helpful? Give feedback.
-
I ended up calling this field "main branch", but having come to do the implementation, I'm concerned it might be confusing. If someone looks at the selector Field called "main branch", used with branch named "main"Configure consumer:
Provider configuration:
Verification output:
Field called "main branch", used with branch named "master"Configure consumer:
Provider configuration:
Verification output:
|
Beta Was this translation helpful? Give feedback.
-
I have recently added but not officially released the
mainDevelopmentBranches
property on the pacticipant. It is an array of strings, and is meant to represent the name(s) of the long lived, non-feature branches that the provider should verify for every build. I am currently unsure on the name of the field and whether or not to make it an array or a string.Whatever it is called, I am planning that it will be used for a few things.
{ "branch": "main" }
(which requires the provider to know the branch names that the consumer uses), the provider will be able to say{ "mainDevelopmentBranches": true }
(or whatever name we decide to call it).autoSelect: true
is specified, the pacts for the main dev branches will be automatically returned (see discussion here)autoSelect: true
, whether or not to return the WIP pacts could be determined based on whether or not the provider is on its mainDevelopmentBranch. Maybe? Unsure about this.${pactbroker.matchingFeatureBranchOrMainDevelopmentBranch}
could be added to allow the webhook to target a particular branch of the provider (see https://pact.canny.io/feature-requests/p/support-feature-branch-matching-for-webhook-triggered-builds). This could only use one main branch value, which makes me think that thismainDevelopmentBranches
(array) should just bemainDevelopmentBranch
(String).Questions:
Beta Was this translation helpful? Give feedback.
All reactions