Configure additional default branches
N
Nic Diaz
Regarding additional default branches described here:
https://support.circleci.com/hc/en-us/articles/15222074173723-How-to-allowlist-additional-branches-for-Only-Build-Pull-Requests Unfortunately, it’s not easy to track what’s happening using using API calls like 'curl', 'JQ' etc. The ability to configure default branches from somewhere else , such as the yaml file or 'Project settings' page would make this much easier to take advantage of. As soon as we have some UI possibilities to manage default branches, we will apply this config to most of all projects and simplify our pipelines.
Andrii Zaiats
As a Build Engineer I want to know which branches are default in my repository and will trigger pipeline additionally to pull requests
Two variants of Acceptance criteria as ideas:
Variant 1
- New option 'Default branches' exists In 'Project setting' / Advanced page above 'Only build pull requests' option.
- I'm able to see currently using pattern to define default branches. For example 'master, RC-v*'
- I'm able to change value and save it for current project
Variant 2 (I like much more)
- In .circleci/config.yaml I have 3 new parameters
1.1. Pattern for default branch name. For that branches pipeline is started as a result of git push
1.2. Pattern for pull request source branch name. In this case pipeline is started as a result of git push to branch with corresponding name in case pull request is opened or pull request from this branch is created.
For example: pattern is 'BCR-*' and I open pull request from 'BCR-123' branch to 'RC-v1' branch.
1.3. Pattern for pull request destination branch name. In this case pipeline is started as a result of git push any branch that has opened pull request to destination branch with corresponding name or corresponding pull request is created.
For example pattern is 'RC-v*' and I open pull request from 'BCR-123' branch to 'RC-v1' branch.
2. I can use all three parameters in my config.yaml together
Thanks