Skip to content

Commit

Permalink
[FIXED JENKINS-41820] Missed some comparisons that were case sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenc committed Feb 9, 2017
1 parent e3f026a commit 5cc878c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -216,7 +216,7 @@ && isApiMatch(((GitHubSCMSource) source).getApiUri())
}
boolean hasPR = false;

boolean fork = !src.getRepoOwner().equals(prOwnerName);
boolean fork = !src.getRepoOwner().equalsIgnoreCase(prOwnerName);

Map<SCMHead, SCMRevision> result = new HashMap<>();

Expand Down
Expand Up @@ -160,13 +160,13 @@ public SCMHeadEventImpl(Type type, GHEventPayload.Push pullRequest, GitHubReposi
}

private boolean isApiMatch(String apiUri) {
return repoHost.equals(RepositoryUriResolver.hostnameFromApiUri(apiUri));
return repoHost.equalsIgnoreCase(RepositoryUriResolver.hostnameFromApiUri(apiUri));
}

@Override
public boolean isMatch(@NonNull SCMNavigator navigator) {
return navigator instanceof GitHubSCMNavigator
&& repoOwner.equals(((GitHubSCMNavigator) navigator).getRepoOwner());
&& repoOwner.equalsIgnoreCase(((GitHubSCMNavigator) navigator).getRepoOwner());
}

@NonNull
Expand All @@ -180,8 +180,8 @@ public String getSourceName() {
public Map<SCMHead, SCMRevision> heads(@NonNull SCMSource source) {
if (!(source instanceof GitHubSCMSource
&& isApiMatch(((GitHubSCMSource) source).getApiUri())
&& repoOwner.equals(((GitHubSCMSource) source).getRepoOwner())
&& repository.equals(((GitHubSCMSource) source).getRepository()))) {
&& repoOwner.equalsIgnoreCase(((GitHubSCMSource) source).getRepoOwner())
&& repository.equalsIgnoreCase(((GitHubSCMSource) source).getRepository()))) {
return Collections.emptyMap();
}
GitHubSCMSource src = (GitHubSCMSource) source;
Expand Down

0 comments on commit 5cc878c

Please sign in to comment.