Merge pull request #33 from kasper-f/redirect_commit_to_build_page

Added "commits" to be redirected to build page.
This commit is contained in:
xaniasd 2014-12-20 15:22:35 +01:00
commit 8d0a780a8a
1 changed files with 3 additions and 1 deletions

View File

@ -140,9 +140,11 @@ public class GitLabWebHook implements UnprotectedRootAction {
e.printStackTrace();
throw HttpResponses.error(500,"Could not generate an image.");
}
} else if(firstPath.equals("builds") && !lastPath.equals("status.json")) {
} else if((firstPath.equals("commits") || firstPath.equals("builds")) && !lastPath.equals("status.json")) {
AbstractBuild build = this.getBuildBySHA1(project, lastPath, true);
redirectToBuildPage(res, build);
} else{
LOGGER.warning("Dynamic request mot met: First path: '" + firstPath + "' late path: '" + lastPath + "'");
}
throw HttpResponses.ok();