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:
            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
            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
            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
            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/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

              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: