-
Bug
-
Resolution: Unresolved
-
Minor
-
None
Branch Discovery Strategy: "Only branches that also filed as PRs" excludes "master" as well.
This looks expected in first look but this behaviour makes this option mostly unusable practically.
As a user, I always expect to see main branch ("master") discovered.
Is there any workaround to this in current implementations? I want to only discover branches filed as PRs + main branch ("master").
Perhaps you can get the result you want, by adding another GitHub branch source in the same multibranch project. Make both branch sources use the same repository. In the second branch source, add the "Discover branches" and "Filter by name (with wildcards)" properties and make the latter include only "master". This would be somewhat cumbersome to maintain though, because you'd have to duplicate all other properties of the branch source as well.
If one could let the GitHub Branch Source plugin discover all branches, but then use the Basic Branch Build Strategies Plugin to select only "master" and branches filed as PRs, then the properties would not need to be duplicated. Unfortunately, Basic Branch Build Strategies Plugin does not implement a "Branches that are also filed as PRs" strategy.