Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-38987

SCMHead/SCMSource/SCMNavigator need getPronoun() to assist contextual naming

    Details

    • Similar Issues:

      Description

      When an owner of a SCMHead, a SCMNavigator or a SCMSource only has one such instance (or where all instances agree on terminology) we need a way to allow the implementations to declare the terminology to be used.

      For example:

      • The GitHub terminology for the thing represented by a SCMNavigator is an "Organization". The GitHub terminology for the thing represented by a SCMSource is a "Repository". The GitHub terminology for the thing represented by a SCMHead is variously a "Branch", "Tag" or "Pull Request"
      • With Bitbucket we have SCMNavigator = "Team", SCMSource = "Repository" and SCMHead = "Branch", "Tag" or "Pull Request"
      • Other SCM systems may have their own completely different terminology.

      Currently, the only way to expose this information is to use a hack with an AlternativeUiTextProvider, e.g. https://github.com/jenkinsci/github-organization-folder-plugin/blob/ebdc1c8e589cf0f24b542f33c08ad885ee66d553/src/main/java/org/jenkinsci/plugins/orgfolder/github/AlternativeUiTextProviderImpl.java

      The hack route is prone to errors, for example if the bitbucket-branch-source plugin wanted to apply its terminology and applied the hack, depending on which AlternativeUiTextProvider ran first, a WorkflowMultiBranchProject with two navigators, one for a BitBucket Team and the other for a GitHub Organization would randomly get the pronoun of "Team" or "Organization". (The question of what should be shown in this case is outside the scope of this change, rather being an issue for the WorkflowMultiBranchProject... a simple solution would be to just sort and join them with / giving "Organization/Team" as the pronoun)

        Attachments

          Issue Links

            Activity

            stephenconnolly Stephen Connolly created issue -
            stephenconnolly Stephen Connolly made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            stephenconnolly Stephen Connolly made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            stephenconnolly Stephen Connolly made changes -
            Remote Link This issue links to "PR#16 (Web Link)" [ 14948 ]
            stephenconnolly Stephen Connolly made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            stephenconnolly Stephen Connolly made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal OSS-1551 (Web Link)" [ 18651 ]
            bitwiseman Liam Newman made changes -
            Link This issue causes JENKINS-54992 [ JENKINS-54992 ]

              People

              • Assignee:
                stephenconnolly Stephen Connolly
                Reporter:
                stephenconnolly Stephen Connolly
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: