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

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

    XMLWordPrintable

    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

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            src/main/java/jenkins/scm/api/SCMHead.java
            src/main/java/jenkins/scm/api/SCMNavigator.java
            src/main/java/jenkins/scm/api/SCMNavigatorDescriptor.java
            src/main/java/jenkins/scm/api/SCMSource.java
            src/main/java/jenkins/scm/api/SCMSourceDescriptor.java
            http://jenkins-ci.org/commit/scm-api-plugin/7f70e0a7254f9b5321eb10c5d65f7dd9695849e8
            Log:
            JENKINS-38987 Add getPronoun() to assist contextual naming

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/jenkins/scm/api/SCMHead.java src/main/java/jenkins/scm/api/SCMNavigator.java src/main/java/jenkins/scm/api/SCMNavigatorDescriptor.java src/main/java/jenkins/scm/api/SCMSource.java src/main/java/jenkins/scm/api/SCMSourceDescriptor.java http://jenkins-ci.org/commit/scm-api-plugin/7f70e0a7254f9b5321eb10c5d65f7dd9695849e8 Log: JENKINS-38987 Add getPronoun() to assist contextual naming
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            pom.xml
            src/main/java/jenkins/branch/BranchSource.java
            src/main/java/jenkins/branch/MultiBranchProject.java
            src/main/java/jenkins/branch/OrganizationFolder.java
            src/main/resources/jenkins/branch/Messages.properties
            http://jenkins-ci.org/commit/branch-api-plugin/96e11cb288d5cb5f16c64b394a87ab83b8e89a08
            Log:
            [JENKINS-38987 Follow-up] Pick up SCMxxx.getPronoun()

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/jenkins/branch/BranchSource.java src/main/java/jenkins/branch/MultiBranchProject.java src/main/java/jenkins/branch/OrganizationFolder.java src/main/resources/jenkins/branch/Messages.properties http://jenkins-ci.org/commit/branch-api-plugin/96e11cb288d5cb5f16c64b394a87ab83b8e89a08 Log: [JENKINS-38987 Follow-up] Pick up SCMxxx.getPronoun()
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            src/main/java/jenkins/branch/MultiBranchProject.java
            src/main/java/jenkins/branch/OrganizationFolder.java
            http://jenkins-ci.org/commit/branch-api-plugin/ccbc3e646675fc63c8deeb34ff41e593e24ba348
            Log:
            JENKINS-38987 Jesse wants spaces

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/jenkins/branch/MultiBranchProject.java src/main/java/jenkins/branch/OrganizationFolder.java http://jenkins-ci.org/commit/branch-api-plugin/ccbc3e646675fc63c8deeb34ff41e593e24ba348 Log: JENKINS-38987 Jesse wants spaces
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            pom.xml
            src/main/java/jenkins/branch/BranchSource.java
            src/main/java/jenkins/branch/MultiBranchProject.java
            src/main/java/jenkins/branch/OrganizationFolder.java
            src/main/resources/jenkins/branch/Messages.properties
            http://jenkins-ci.org/commit/branch-api-plugin/637eeced2a9adbd02e0ded25eb3bdfc34caa0a79
            Log:
            Merge pull request #52 from jenkinsci/jenkins-38987-follow-up

            [JENKINS-38987 Follow-up] Pick up SCMxxx.getPronoun()

            Compare: https://github.com/jenkinsci/branch-api-plugin/compare/4fdf888d6284...637eeced2a9a

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/jenkins/branch/BranchSource.java src/main/java/jenkins/branch/MultiBranchProject.java src/main/java/jenkins/branch/OrganizationFolder.java src/main/resources/jenkins/branch/Messages.properties http://jenkins-ci.org/commit/branch-api-plugin/637eeced2a9adbd02e0ded25eb3bdfc34caa0a79 Log: Merge pull request #52 from jenkinsci/jenkins-38987-follow-up [JENKINS-38987 Follow-up] Pick up SCMxxx.getPronoun() Compare: https://github.com/jenkinsci/branch-api-plugin/compare/4fdf888d6284...637eeced2a9a
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            src/main/java/jenkins/scm/api/SCMHead.java
            src/main/java/jenkins/scm/api/SCMNavigator.java
            src/main/java/jenkins/scm/api/SCMNavigatorDescriptor.java
            src/main/java/jenkins/scm/api/SCMSource.java
            src/main/java/jenkins/scm/api/SCMSourceDescriptor.java
            http://jenkins-ci.org/commit/scm-api-plugin/064fcfa23f63b5726f7c9a37b8a412c4c32423ff
            Log:
            Merge pull request #16 from jenkinsci/jenkins-38987

            [FIXED JENKINS-38987] Add getPronoun() to assist contextual naming

            Compare: https://github.com/jenkinsci/scm-api-plugin/compare/f909068e6155...064fcfa23f63

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/jenkins/scm/api/SCMHead.java src/main/java/jenkins/scm/api/SCMNavigator.java src/main/java/jenkins/scm/api/SCMNavigatorDescriptor.java src/main/java/jenkins/scm/api/SCMSource.java src/main/java/jenkins/scm/api/SCMSourceDescriptor.java http://jenkins-ci.org/commit/scm-api-plugin/064fcfa23f63b5726f7c9a37b8a412c4c32423ff Log: Merge pull request #16 from jenkinsci/jenkins-38987 [FIXED JENKINS-38987] Add getPronoun() to assist contextual naming Compare: https://github.com/jenkinsci/scm-api-plugin/compare/f909068e6155...064fcfa23f63
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/multibranch/BranchJobProperty.java
            src/test/java/org/jenkinsci/plugins/workflow/multibranch/SCMBinderTest.java
            http://jenkins-ci.org/commit/workflow-multibranch-plugin/3457d8357dfac7dc10c35312496c8d00210eb95e
            Log:
            [JENKINS-38987 Follow-up] Expose the SCM API pronoun information

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/multibranch/BranchJobProperty.java src/test/java/org/jenkinsci/plugins/workflow/multibranch/SCMBinderTest.java http://jenkins-ci.org/commit/workflow-multibranch-plugin/3457d8357dfac7dc10c35312496c8d00210eb95e Log: [JENKINS-38987 Follow-up] Expose the SCM API pronoun information
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/github_branch_source/BranchSCMHead.java
            src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java
            src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java
            src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSCMHead.java
            src/main/resources/org/jenkinsci/plugins/github_branch_source/Messages.properties
            http://jenkins-ci.org/commit/github-branch-source-plugin/c0557dd3fa8b53e0ff52d315424cebd8fdfd61d9
            Log:
            [JENKINS-38987 Follow-up] Provide implementations of getPronoun() for the SCMHead/Source/Navigator

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/org/jenkinsci/plugins/github_branch_source/BranchSCMHead.java src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSCMHead.java src/main/resources/org/jenkinsci/plugins/github_branch_source/Messages.properties http://jenkins-ci.org/commit/github-branch-source-plugin/c0557dd3fa8b53e0ff52d315424cebd8fdfd61d9 Log: [JENKINS-38987 Follow-up] Provide implementations of getPronoun() for the SCMHead/Source/Navigator
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/github_branch_source/BranchSCMHead.java
            src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java
            src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java
            src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSCMHead.java
            src/main/resources/org/jenkinsci/plugins/github_branch_source/Messages.properties
            http://jenkins-ci.org/commit/github-branch-source-plugin/9dbc8d752aad381d527bcfb423c2929a8d0043b0
            Log:
            Merge pull request #82 from jenkinsci/jenkins-38987-followup

            [JENKINS-38987 Follow-up] Provide implementations of getPronoun() for the SCMHead/Source/Navigator

            Compare: https://github.com/jenkinsci/github-branch-source-plugin/compare/794434f40178...9dbc8d752aad

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/org/jenkinsci/plugins/github_branch_source/BranchSCMHead.java src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMNavigator.java src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSCMHead.java src/main/resources/org/jenkinsci/plugins/github_branch_source/Messages.properties http://jenkins-ci.org/commit/github-branch-source-plugin/9dbc8d752aad381d527bcfb423c2929a8d0043b0 Log: Merge pull request #82 from jenkinsci/jenkins-38987-followup [JENKINS-38987 Follow-up] Provide implementations of getPronoun() for the SCMHead/Source/Navigator Compare: https://github.com/jenkinsci/github-branch-source-plugin/compare/794434f40178...9dbc8d752aad
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/multibranch/BranchJobProperty.java
            http://jenkins-ci.org/commit/workflow-multibranch-plugin/2adbee000ae4c0b16a73ca54817a51f5fd6fa336
            Log:
            [JENKINS-38987 Follow-up] Addressing @jglick's review comments

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/multibranch/BranchJobProperty.java http://jenkins-ci.org/commit/workflow-multibranch-plugin/2adbee000ae4c0b16a73ca54817a51f5fd6fa336 Log: [JENKINS-38987 Follow-up] Addressing @jglick's review comments
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            pom.xml
            http://jenkins-ci.org/commit/workflow-multibranch-plugin/6c956be22279472f97d8614c3ecf1ecc62331563
            Log:
            [JENKINS-38987 Follow-up] Remove dependency upgrade that slipped in from IconSet changes

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml http://jenkins-ci.org/commit/workflow-multibranch-plugin/6c956be22279472f97d8614c3ecf1ecc62331563 Log: [JENKINS-38987 Follow-up] Remove dependency upgrade that slipped in from IconSet changes
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/multibranch/BranchJobProperty.java
            src/test/java/org/jenkinsci/plugins/workflow/multibranch/SCMBinderTest.java
            http://jenkins-ci.org/commit/workflow-multibranch-plugin/3f1a413631dcfd122fc6c87867052eca0855c704
            Log:
            Merge pull request #37 from jenkinsci/jenkins-38987-followup

            [JENKINS-38987 Follow-up] Expose the SCM API pronoun information

            Compare: https://github.com/jenkinsci/workflow-multibranch-plugin/compare/7d126dfd8955...3f1a413631dc

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/multibranch/BranchJobProperty.java src/test/java/org/jenkinsci/plugins/workflow/multibranch/SCMBinderTest.java http://jenkins-ci.org/commit/workflow-multibranch-plugin/3f1a413631dcfd122fc6c87867052eca0855c704 Log: Merge pull request #37 from jenkinsci/jenkins-38987-followup [JENKINS-38987 Follow-up] Expose the SCM API pronoun information Compare: https://github.com/jenkinsci/workflow-multibranch-plugin/compare/7d126dfd8955...3f1a413631dc

              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: