If a Git SCM checkout is configured with multiple repositories then all change sets for the build will use GitHubProjectProperty value for URL when building change links.

      Pipeline Example:

       

      pipeline {
          agent any
      
          stages {
              stage('Checkout'){
                  steps {
                      checkout(
                          [
                              $class: 'GitSCM', 
                              branches: [[name: '*/master']],
                              doGenerateSubmoduleConfigurations: false,
                              extensions: [],
                              submoduleCfg: [],
                              userRemoteConfigs: [
                                  [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-one'], 
                                  [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-two']
                              ]
                          ]
                      )
                  }
              }
          }
      }

       

      If I were to trigger a build by pushing a change to 'https://github.com/Organization/repo-two' then the change set links would be 'https://github.com/Organization/repo-one/commit/<CommitId>' resulting in a 404.

      To clarify this still happens even if the repositories are broken into seperate SCM checkouts in a single pipeline. Issue is slightly mitigated by declaring the repository browser type on the individual checkouts.

      This also occurs on non pipeline jobs as well.

          [JENKINS-45815] Wrong ChangeSet Url for N+1 Repositories.

          Trevor Howard created issue -
          Trevor Howard made changes -
          Description Original: If a Git SCM checkout is configured with multiple repositories then all change sets for the build will use the first repository's browser URL when building change links.

          Pipeline Example:

           
          {code:java}
          pipeline {
              agent any

              stages {
                  stage('Checkout'){
                      steps {
                          checkout(
                              [
                                  $class: 'GitSCM',
                                  branches: [[name: '*/master']],
                                  doGenerateSubmoduleConfigurations: false,
                                  extensions: [],
                                  submoduleCfg: [],
                                  userRemoteConfigs: [
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-one&#39;],
                                      [credentialsId: 'githubId', url: 'https://github.secureserver.net/ECM/repo-two&#39;]
                                  ]
                              ]
                          )
                      }
                  }
              }
          }{code}
           

          If I were to trigger a build by pushing a change to '[https://github.secureserver.net/ECM/repo-two&#39;] then the change set links would be 'https://github.secureserver.net/ECM/repo-one/commit/&lt;CommitId&gt;&#39;&#xA0;resulting in a 404.
          New: If a Git SCM checkout is configured with multiple repositories then all change sets for the build will use the first repository's browser URL when building change links.

          Pipeline Example:

           
          {code:java}
          pipeline {
              agent any

              stages {
                  stage('Checkout'){
                      steps {
                          checkout(
                              [
                                  $class: 'GitSCM',
                                  branches: [[name: '*/master']],
                                  doGenerateSubmoduleConfigurations: false,
                                  extensions: [],
                                  submoduleCfg: [],
                                  userRemoteConfigs: [
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-one&#39;],
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-two&#39;]
                                  ]
                              ]
                          )
                      }
                  }
              }
          }{code}
           

          If I were to trigger a build by pushing a change to '[https://github.secureserver.net/ECM/repo-two&#39;] then the change set links would be 'https://github.secureserver.net/ECM/repo-one/commit/&lt;CommitId&gt;&#39;&#xA0;resulting in a 404.
          Trevor Howard made changes -
          Description Original: If a Git SCM checkout is configured with multiple repositories then all change sets for the build will use the first repository's browser URL when building change links.

          Pipeline Example:

           
          {code:java}
          pipeline {
              agent any

              stages {
                  stage('Checkout'){
                      steps {
                          checkout(
                              [
                                  $class: 'GitSCM',
                                  branches: [[name: '*/master']],
                                  doGenerateSubmoduleConfigurations: false,
                                  extensions: [],
                                  submoduleCfg: [],
                                  userRemoteConfigs: [
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-one&#39;],
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-two&#39;]
                                  ]
                              ]
                          )
                      }
                  }
              }
          }{code}
           

          If I were to trigger a build by pushing a change to '[https://github.secureserver.net/ECM/repo-two&#39;] then the change set links would be 'https://github.secureserver.net/ECM/repo-one/commit/&lt;CommitId&gt;&#39;&#xA0;resulting in a 404.
          New: If a Git SCM checkout is configured with multiple repositories then all change sets for the build will use the first repository's browser URL when building change links.

          Pipeline Example:

           
          {code:java}
          pipeline {
              agent any

              stages {
                  stage('Checkout'){
                      steps {
                          checkout(
                              [
                                  $class: 'GitSCM',
                                  branches: [[name: '*/master']],
                                  doGenerateSubmoduleConfigurations: false,
                                  extensions: [],
                                  submoduleCfg: [],
                                  userRemoteConfigs: [
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-one&#39;],
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-two&#39;]
                                  ]
                              ]
                          )
                      }
                  }
              }
          }{code}
           

          If I were to trigger a build by pushing a change to '[https://github.com/Organization/repo-two&#39;|https://github.secureserver.net/ECM/repo-two&#39;] then the change set links would be 'https://github.com/Organization/repo-one/commit/&lt;CommitId&gt;&#39;&#xA0;resulting in a 404.
          Mark Waite made changes -
          Assignee Original: Mark Waite [ markewaite ]
          Trevor Howard made changes -
          Description Original: If a Git SCM checkout is configured with multiple repositories then all change sets for the build will use the first repository's browser URL when building change links.

          Pipeline Example:

           
          {code:java}
          pipeline {
              agent any

              stages {
                  stage('Checkout'){
                      steps {
                          checkout(
                              [
                                  $class: 'GitSCM',
                                  branches: [[name: '*/master']],
                                  doGenerateSubmoduleConfigurations: false,
                                  extensions: [],
                                  submoduleCfg: [],
                                  userRemoteConfigs: [
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-one&#39;],
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-two&#39;]
                                  ]
                              ]
                          )
                      }
                  }
              }
          }{code}
           

          If I were to trigger a build by pushing a change to '[https://github.com/Organization/repo-two&#39;|https://github.secureserver.net/ECM/repo-two&#39;] then the change set links would be 'https://github.com/Organization/repo-one/commit/&lt;CommitId&gt;&#39;&#xA0;resulting in a 404.
          New: If a Git SCM checkout is configured with multiple repositories then all change sets for the build will use the first repository's browser URL when building change links.

          Pipeline Example:

           
          {code:java}
          pipeline {
              agent any

              stages {
                  stage('Checkout'){
                      steps {
                          checkout(
                              [
                                  $class: 'GitSCM',
                                  branches: [[name: '*/master']],
                                  doGenerateSubmoduleConfigurations: false,
                                  extensions: [],
                                  submoduleCfg: [],
                                  userRemoteConfigs: [
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-one&#39;],
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-two&#39;]
                                  ]
                              ]
                          )
                      }
                  }
              }
          }{code}
           

          If I were to trigger a build by pushing a change to '[https://github.com/Organization/repo-two&#39;|https://github.secureserver.net/ECM/repo-two&#39;] then the change set links would be 'https://github.com/Organization/repo-one/commit/&lt;CommitId&gt;&#39;&#xA0;resulting in a 404.

          To clarify this still happens even if the repositories are broken into seperate SCM checkouts in a single pipeline. Issue is slightly mitigated by declaring the repository browser type on the individual checkouts.

          This also occurs on non pipeline jobs as well.
          Trevor Howard made changes -
          Comment [ Would it make sense to store the remote origin URL in the generated changelog XML files or in another file that maps to the correct changelog file?

          ChangeLogParser could read this value in and assign it as an attribute called projectUrl on generated ChangeLogSet that's separate from browser since this can be Null depending on the SCM configuration...

           

          Looks like this stems from GithubProjectProperty only storing a single URL...

          If a single pipeline job has multiple changLogSets stemming from multiple repositories then the GithubLinkAnnotator could resolve the actual URL from the change entry's parent by using the above proposed 'projectURL' attribute stored in anything extending ChangeLogSet. ]
          Trevor Howard made changes -
          Description Original: If a Git SCM checkout is configured with multiple repositories then all change sets for the build will use the first repository's browser URL when building change links.

          Pipeline Example:

           
          {code:java}
          pipeline {
              agent any

              stages {
                  stage('Checkout'){
                      steps {
                          checkout(
                              [
                                  $class: 'GitSCM',
                                  branches: [[name: '*/master']],
                                  doGenerateSubmoduleConfigurations: false,
                                  extensions: [],
                                  submoduleCfg: [],
                                  userRemoteConfigs: [
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-one&#39;],
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-two&#39;]
                                  ]
                              ]
                          )
                      }
                  }
              }
          }{code}
           

          If I were to trigger a build by pushing a change to '[https://github.com/Organization/repo-two&#39;|https://github.secureserver.net/ECM/repo-two&#39;] then the change set links would be 'https://github.com/Organization/repo-one/commit/&lt;CommitId&gt;&#39;&#xA0;resulting in a 404.

          To clarify this still happens even if the repositories are broken into seperate SCM checkouts in a single pipeline. Issue is slightly mitigated by declaring the repository browser type on the individual checkouts.

          This also occurs on non pipeline jobs as well.
          New: If a Git SCM checkout is configured with multiple repositories then all change sets for the build will use GitHubProjectProperty value for URL when building change links if set.

          Pipeline Example:

           
          {code:java}
          pipeline {
              agent any

              stages {
                  stage('Checkout'){
                      steps {
                          checkout(
                              [
                                  $class: 'GitSCM',
                                  branches: [[name: '*/master']],
                                  doGenerateSubmoduleConfigurations: false,
                                  extensions: [],
                                  submoduleCfg: [],
                                  userRemoteConfigs: [
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-one&#39;],
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-two&#39;]
                                  ]
                              ]
                          )
                      }
                  }
              }
          }{code}
           

          If I were to trigger a build by pushing a change to '[https://github.com/Organization/repo-two&#39;|https://github.secureserver.net/ECM/repo-two&#39;] then the change set links would be 'https://github.com/Organization/repo-one/commit/&lt;CommitId&gt;&#39;&#xA0;resulting in a 404.

          To clarify this still happens even if the repositories are broken into seperate SCM checkouts in a single pipeline. Issue is slightly mitigated by declaring the repository browser type on the individual checkouts.

          This also occurs on non pipeline jobs as well.
          Trevor Howard made changes -
          Description Original: If a Git SCM checkout is configured with multiple repositories then all change sets for the build will use GitHubProjectProperty value for URL when building change links if set.

          Pipeline Example:

           
          {code:java}
          pipeline {
              agent any

              stages {
                  stage('Checkout'){
                      steps {
                          checkout(
                              [
                                  $class: 'GitSCM',
                                  branches: [[name: '*/master']],
                                  doGenerateSubmoduleConfigurations: false,
                                  extensions: [],
                                  submoduleCfg: [],
                                  userRemoteConfigs: [
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-one&#39;],
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-two&#39;]
                                  ]
                              ]
                          )
                      }
                  }
              }
          }{code}
           

          If I were to trigger a build by pushing a change to '[https://github.com/Organization/repo-two&#39;|https://github.secureserver.net/ECM/repo-two&#39;] then the change set links would be 'https://github.com/Organization/repo-one/commit/&lt;CommitId&gt;&#39;&#xA0;resulting in a 404.

          To clarify this still happens even if the repositories are broken into seperate SCM checkouts in a single pipeline. Issue is slightly mitigated by declaring the repository browser type on the individual checkouts.

          This also occurs on non pipeline jobs as well.
          New: If a Git SCM checkout is configured with multiple repositories then all change sets for the build will use GitHubProjectProperty value for URL when building change links.

          Pipeline Example:

           
          {code:java}
          pipeline {
              agent any

              stages {
                  stage('Checkout'){
                      steps {
                          checkout(
                              [
                                  $class: 'GitSCM',
                                  branches: [[name: '*/master']],
                                  doGenerateSubmoduleConfigurations: false,
                                  extensions: [],
                                  submoduleCfg: [],
                                  userRemoteConfigs: [
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-one&#39;],
                                      [credentialsId: 'githubId', url: 'https://github.com/Organization/repo-two&#39;]
                                  ]
                              ]
                          )
                      }
                  }
              }
          }{code}
           

          If I were to trigger a build by pushing a change to '[https://github.com/Organization/repo-two&#39;|https://github.secureserver.net/ECM/repo-two&#39;] then the change set links would be 'https://github.com/Organization/repo-one/commit/&lt;CommitId&gt;&#39;&#xA0;resulting in a 404.

          To clarify this still happens even if the repositories are broken into seperate SCM checkouts in a single pipeline. Issue is slightly mitigated by declaring the repository browser type on the individual checkouts.

          This also occurs on non pipeline jobs as well.
          Trevor Howard made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            Unassigned Unassigned
            tahoward Trevor Howard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: