Expose if a multi-branch pipeline branch job is default/primary to REST API

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    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.

          Assignee:
          Mark R
          Reporter:
          Mark R
          Archiver:
          Jenkins Service Account

            Created:
            Updated:
            Resolved:
            Archived: