Skip to content
Permalink
Browse files

[JENKINS-34237] GH Organizations and GH User Accounts are searched us…

…ing insensitive case
  • Loading branch information
recena
recena committed Apr 18, 2016
1 parent 0865ca4 commit e7f4d3bcde4815e6a74317bd9329c3d897e6c612
@@ -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)) {
@@ -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);
@@ -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);
@@ -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);
}
@@ -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());
}
@@ -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());
}

0 comments on commit e7f4d3b

Please sign in to comment.
You can’t perform that action at this time.