fix bug that settings page while not show any branch if gitlab repo uses http protocol

This commit is contained in:
axb 2014-11-20 13:59:20 +08:00
parent b00afa10ea
commit 6c59aaceed
1 changed files with 2 additions and 1 deletions

View File

@ -294,7 +294,8 @@ public class GitLabPushTrigger extends Trigger<AbstractProject<?, ?>> {
if (!gitlabHostUrl.isEmpty() && (null != sourceRepository)) {
List<GitlabProject> projects = getGitlab().instance().getProjects();
for (GitlabProject project : projects) {
if(project.getSshUrl().equalsIgnoreCase(sourceRepository.toString())){
if(project.getSshUrl().equalsIgnoreCase(sourceRepository.toString()) ||
project.getHttpUrl().equalsIgnoreCase(sourceRepository.toString())){
//Get all branches of project
List<GitlabBranch> branches = getGitlab().instance().getBranches(project);
for (GitlabBranch branch : branches){