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

Comparing repo owner in webhook with SCM source should be case-insensitive

    Details

    • Similar Issues:

      Description

      We have a GitHub (Enterprise) organisation whose canonical name is "FooBar".

      However, we have a Multibranch Pipeline that uses a GitHub Branch Source with owner "foobar". In this case, the branch source GitHub ignores incoming webhooks, as String.equals() is used (e.g. in PullRequestGHEventSubscriber).

      GitHub is very lenient when checking out repos, e.g. git clone git@github.example.com:fooBAR/AnDroiD.git works fine for the FooBar/android repo — so it seems likely that people will end up configuring jobs using a non-canonical capitalisation of the user/org name.

      The repo name comparison should likely be case-insensitive too. The repo name is usually configured via a dropdown, so it should have the canonical case, but I also configure MB Pipelines with the Job DSL plugin, so the possibility for error remains.

      Log:

      // With branch source owner = "foobar"
      Oct 19, 2016 3:35:06 PM FINE org.jenkinsci.plugins.github_branch_source.PullRequestGHEventSubscriber
      Received POST for https://github.example.com/FooBar/android
      Oct 19, 2016 3:35:11 PM FINE org.jenkinsci.plugins.github_branch_source.PullRequestGHEventSubscriber
      PR event on github.example.com:FooBar/android did not match any project
      
      // With branch source owner = "FooBar"
      Oct 19, 2016 3:38:15 PM FINE org.jenkinsci.plugins.github_branch_source.PullRequestGHEventSubscriber
      Received POST for https://github.example.com/FooBar/android
      Oct 19, 2016 3:38:20 PM FINE org.jenkinsci.plugins.github_branch_source.PullRequestGHEventSubscriber
      PR event on github.example.com:FooBar/android forwarded to foobar/android-pr
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stephenconnolly Stephen Connolly
                Reporter:
                orrc Christopher Orr
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: