Skip to content

Commit

Permalink
[JENKINS-34237] GH Organizations and GH User Accounts are searched us…
Browse files Browse the repository at this point in the history
…ing insensitive case
  • Loading branch information
recena committed Apr 18, 2016
1 parent 0865ca4 commit e7f4d3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -119,7 +119,7 @@ public String getApiUri() {
} catch (IOException e) {
// Something wrong happened, maybe java.net.ConnectException?
}
if (myself != null && repoOwner.equals(myself.getLogin())) {
if (myself != null && repoOwner.equalsIgnoreCase(myself.getLogin())) {
listener.getLogger().format("Looking up repositories of myself %s%n%n", repoOwner);
for (GHRepository repo : myself.listRepositories()) {
if (!repo.getOwnerName().equals(repoOwner)) {
Expand All @@ -142,7 +142,7 @@ public String getApiUri() {
} catch (IOException e) {
// may be a user... ok to ignore
}
if (org != null && repoOwner.equals(org.getLogin())) {
if (org != null && repoOwner.equalsIgnoreCase(org.getLogin())) {
listener.getLogger().format("Looking up repositories of organization %s%n%n", repoOwner);
for (GHRepository repo : org.listRepositories()) {
add(listener, observer, repo);
Expand All @@ -159,7 +159,7 @@ public String getApiUri() {
} catch (IOException e) {
// Something wrong happened, maybe java.net.ConnectException?
}
if (user != null && repoOwner.equals(user.getLogin())) {
if (user != null && repoOwner.equalsIgnoreCase(user.getLogin())) {
listener.getLogger().format("Looking up repositories of user %s%n%n", repoOwner);
for (GHRepository repo : user.listRepositories()) {
add(listener, observer, repo);
Expand Down
Expand Up @@ -524,7 +524,7 @@ public ListBoxModel doFillRepositoryItems(@AncestorInPath SCMSourceOwner context
LOGGER.log(Level.WARNING, "Exception retrieving the repositories of the owner " + repoOwner +
" on " + apiUri + " with credentials " + CredentialsNameProvider.name(credentials));
}
if (myself != null && repoOwner.equals(myself.getLogin())) {
if (myself != null && repoOwner.equalsIgnoreCase(myself.getLogin())) {
for (String name : myself.getAllRepositories().keySet()) {
result.add(name);
}
Expand All @@ -540,7 +540,7 @@ public ListBoxModel doFillRepositoryItems(@AncestorInPath SCMSourceOwner context
} catch (IOException e) {
LOGGER.log(Level.WARNING, e.getMessage());
}
if (org != null && repoOwner.equals(org.getLogin())) {
if (org != null && repoOwner.equalsIgnoreCase(org.getLogin())) {
for (GHRepository repo : org.listRepositories()) {
result.add(repo.getName());
}
Expand All @@ -555,7 +555,7 @@ public ListBoxModel doFillRepositoryItems(@AncestorInPath SCMSourceOwner context
} catch (IOException e) {
LOGGER.log(Level.WARNING, e.getMessage());
}
if (user != null && repoOwner.equals(user.getLogin())) {
if (user != null && repoOwner.equalsIgnoreCase(user.getLogin())) {
for (GHRepository repo : user.listRepositories()) {
result.add(repo.getName());
}
Expand Down

0 comments on commit e7f4d3b

Please sign in to comment.