Wrong ChangeSet Url for N+1 Repositories.

XMLWordPrintable

      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.

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

              Created:
              Updated:
              Resolved: