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

API to generate (mostly) human readable names of SCM server URLs

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • scm-api-plugin
    • None

      SCM plugins often need to maintain a list of SCM servers, and as such need an API to take an URL and turn it into a reasonable suggestion of a display name to cover the cases where the user doesn't bother to provide a display name.

      Acceptance criteria:

      • The API will only process the hostname part of the supplied URLs
      • In cases where no sensible name can be generated, the API returns a null response
      • The API shall remove public TLDs and well known public SLDs from the hostname.
      • The API will remove a caller provided list of well known prefixes from the hostname.
      • The hostname shall be punycode decoded if necessary

          [JENKINS-45436] API to generate (mostly) human readable names of SCM server URLs

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugin/gitea/servers/GiteaServer.java
          http://jenkins-ci.org/commit/gitea-plugin/1a9e01772319eab522a63a5d05cd8f1a1ca8fd7a
          Log:
          JENKINS-45436 Pick up SCMName API

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/org/jenkinsci/plugin/gitea/servers/GiteaServer.java http://jenkins-ci.org/commit/gitea-plugin/1a9e01772319eab522a63a5d05cd8f1a1ca8fd7a Log: JENKINS-45436 Pick up SCMName API

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/main/java/jenkins/scm/api/SCMName.java
          src/test/java/jenkins/scm/api/SCMNameTest.java
          http://jenkins-ci.org/commit/scm-api-plugin/ef9f8534da54b15cea53724d393f02aad128ff6a
          Log:
          [FIXED JENKINS-45436] Add an API to assist deriving human names from URLs

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/jenkins/scm/api/SCMName.java src/test/java/jenkins/scm/api/SCMNameTest.java http://jenkins-ci.org/commit/scm-api-plugin/ef9f8534da54b15cea53724d393f02aad128ff6a Log: [FIXED JENKINS-45436] Add an API to assist deriving human names from URLs

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/test/java/jenkins/scm/api/SCMNameTest.java
          http://jenkins-ci.org/commit/scm-api-plugin/54f70c02ea7adae62ceda1523904553c8e0fcd34
          Log:
          JENKINS-45436 I know Java source is unicode, but let's be ultra safe in tests

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/test/java/jenkins/scm/api/SCMNameTest.java http://jenkins-ci.org/commit/scm-api-plugin/54f70c02ea7adae62ceda1523904553c8e0fcd34 Log: JENKINS-45436 I know Java source is unicode, but let's be ultra safe in tests

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/main/java/jenkins/scm/api/SCMName.java
          http://jenkins-ci.org/commit/scm-api-plugin/4f7f0a6651f07d2c8b0b83c3aa6abe9c1c352981
          Log:
          JENKINS-45436 Address oleg's review comments

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/jenkins/scm/api/SCMName.java http://jenkins-ci.org/commit/scm-api-plugin/4f7f0a6651f07d2c8b0b83c3aa6abe9c1c352981 Log: JENKINS-45436 Address oleg's review comments

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/main/java/jenkins/scm/api/SCMName.java
          src/test/java/jenkins/scm/api/SCMNameTest.java
          http://jenkins-ci.org/commit/scm-api-plugin/0549477b0514ab94cf9bad44992aa60d666b8be4
          Log:
          Merge pull request #45 from stephenc/jenkins-45436

          [FIXED JENKINS-45436] Add an API to assist deriving human names from URLs

          Compare: https://github.com/jenkinsci/scm-api-plugin/compare/725d4b464588...0549477b0514

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/jenkins/scm/api/SCMName.java src/test/java/jenkins/scm/api/SCMNameTest.java http://jenkins-ci.org/commit/scm-api-plugin/0549477b0514ab94cf9bad44992aa60d666b8be4 Log: Merge pull request #45 from stephenc/jenkins-45436 [FIXED JENKINS-45436] Add an API to assist deriving human names from URLs Compare: https://github.com/jenkinsci/scm-api-plugin/compare/725d4b464588...0549477b0514

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugin/gitea/servers/GiteaServer.java
          http://jenkins-ci.org/commit/gitea-plugin/da03e4335eb20c6e745c22a829ce31d24d62c444
          Log:
          Merge pull request #2 from jenkinsci/jenkins-45436

          JENKINS-45436 Pick up SCMName API

          Compare: https://github.com/jenkinsci/gitea-plugin/compare/8c1683e896e5...da03e4335eb2

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/org/jenkinsci/plugin/gitea/servers/GiteaServer.java http://jenkins-ci.org/commit/gitea-plugin/da03e4335eb20c6e745c22a829ce31d24d62c444 Log: Merge pull request #2 from jenkinsci/jenkins-45436 JENKINS-45436 Pick up SCMName API Compare: https://github.com/jenkinsci/gitea-plugin/compare/8c1683e896e5...da03e4335eb2

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/github_branch_source/Endpoint.java
          http://jenkins-ci.org/commit/github-branch-source-plugin/7e8f57ff989b109af5217d5c6b07f769f2b4fa8b
          Log:
          JENKINS-45436 Pick up SCMName API

          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/Endpoint.java http://jenkins-ci.org/commit/github-branch-source-plugin/7e8f57ff989b109af5217d5c6b07f769f2b4fa8b Log: JENKINS-45436 Pick up SCMName API

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/github_branch_source/Endpoint.java
          http://jenkins-ci.org/commit/github-branch-source-plugin/388545bfab0256cc9e7117cf1a4226dac27f43ac
          Log:
          Merge pull request #145 from stephenc/jenkins-45436

          JENKINS-45436 Pick up SCMName API

          Compare: https://github.com/jenkinsci/github-branch-source-plugin/compare/a507a73a223a...388545bfab02

          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/Endpoint.java http://jenkins-ci.org/commit/github-branch-source-plugin/388545bfab0256cc9e7117cf1a4226dac27f43ac Log: Merge pull request #145 from stephenc/jenkins-45436 JENKINS-45436 Pick up SCMName API Compare: https://github.com/jenkinsci/github-branch-source-plugin/compare/a507a73a223a...388545bfab02

            stephenconnolly Stephen Connolly
            stephenconnolly Stephen Connolly
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: