github-plugin icon indicating copy to clipboard operation
github-plugin copied to clipboard

[JENKINS-28393] Allow case insensitive matching on companyName/repoName in GH plugin

Open jenkins-infra-bot opened this issue 10 years ago • 1 comments

The github jenkins documentation at https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin says:

```
When creating a job, specify that is connects to git. Under "Github project", put in: git@​github.com:Person/Project.git Under "Source Code Management" select Git, and put in git@​github.com:Person/Project.git
```

When we try git@​github.com:/.git it does not work. However, https://github.com// works for us.

This causes a problem with push notifications, though. I get the following messages in the logs:

```
May 13, 2015 4:05:26 PM FINE com.cloudbees.jenkins.GitHubWebHook
Considering to poke webserver_test_master
May 13, 2015 4:05:26 PM FINE com.cloudbees.jenkins.GitHubWebHook
Skipped webserver_test_master because it doesn't have a matching repository.
```

Presumably there are no names found in the addRepositories method in https://github.com/jenkinsci/github-plugin/blob/master/src/main/java/com/cloudbees/jenkins/GitHubRepositoryNameContributor.java

Incidentally, it would be very helpful to have a logger in that function which details what URLs it is parsing and what names it gets (if any).

Thanks for the very useful tool!


Originally reported by angledluffa, imported from: Allow case insensitive matching on companyName/repoName in GH plugin
  • assignee: lanwen
  • status: Open
  • priority: Major
  • component(s): github-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-08
Raw content of original issue

The github jenkins documentation at https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin says:

``` When creating a job, specify that is connects to git. Under "Github project", put in: [email protected]:Person/Project.git Under "Source Code Management" select Git, and put in [email protected]:Person/Project.git ```

When we try [email protected]:<company>/<project>.git it does not work. However, https://github.com/<company>/<project> works for us.

This causes a problem with push notifications, though. I get the following messages in the logs:

``` May 13, 2015 4:05:26 PM FINE com.cloudbees.jenkins.GitHubWebHook Considering to poke webserver_test_master May 13, 2015 4:05:26 PM FINE com.cloudbees.jenkins.GitHubWebHook Skipped webserver_test_master because it doesn't have a matching repository. ```

Presumably there are no names found in the addRepositories method in https://github.com/jenkinsci/github-plugin/blob/master/src/main/java/com/cloudbees/jenkins/GitHubRepositoryNameContributor.java

Incidentally, it would be very helpful to have a logger in that function which details what URLs it is parsing and what names it gets (if any).

Thanks for the very useful tool!

environment
Jenkins 1.613<br/>
GitHub 1.11.3

jenkins-infra-bot avatar May 13 '15 23:05 jenkins-infra-bot

angledluffa:
  • Original comment link
  • Raw content of original comment:

    Here is a lot more information about what is happening.

    github allows case insensitive matching, so both of these work

    https://github.com/<companyname>/<project> https://github.com/<CompanyName>/<project>

    assuming the name on github is actually CompanyName, github then sends back the URL

    https://github.com/<CompanyName>/<project>

    The plugin rejects the match if the URL entered was

    https://github.com/<companyname>/<project>

    I suggest allowing case insensitive matching on companyname so future users don't spend hours debugging this problem.

Here is a lot more information about what is happening.

github allows case insensitive matching, so both of these work

https://github.com//
https://github.com//

assuming the name on github is actually CompanyName, github then sends back the URL

https://github.com//

The plugin rejects the match if the URL entered was

https://github.com//

I suggest allowing case insensitive matching on companyname so future users don't spend hours debugging this problem.

jenkins-infra-bot avatar May 14 '15 00:05 jenkins-infra-bot