-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
A WorkflowJob should expose a variable in the REST API to indicate if it is a default/primary branch.
The scm api plugin contains a PrimaryInstanceMetadataAction which is used to indicate if a git branch is the default branch. The workflow-multibranch-plugin is aware of this and uses it to mark the text in the table as strong here. It also shows up in the config.xml of the branch job:
<actions> <jenkins.scm.api.metadata.PrimaryInstanceMetadataAction plugin="scm-api@676.v886669a_199a_a_"/> </actions>
Currently this information can be obtained by loading the config.xml individually for each job. By exposing it to the REST API it can be loaded for multiple jobs at once if desired using the proper tree expression.