Merge pull request #12 from alexiskapit/fix-project-search-d

Fix project search
This commit is contained in:
xaniasd 2014-09-01 13:56:27 +02:00
commit 8739dbc84c
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ public class GitLabWebHook implements UnprotectedRootAction {
final Jenkins jenkins = Jenkins.getInstance();
if (jenkins != null) {
Item item = jenkins.getItemByFullName(projectName);
while (item instanceof ItemGroup<?> && restOfPathParts.hasNext()) {
while (item instanceof ItemGroup<?> && !(item instanceof AbstractProject<?, ?>) && restOfPathParts.hasNext()) {
item = jenkins.getItem(restOfPathParts.next(), (ItemGroup<?>) item);
}
if (item instanceof AbstractProject<?, ?>) {