@IsAllowed(value = Operation.CLOSE, resourceType = ResourceType.PULL_REQUEST)
public static Result close(String userName, String projectName, Long pullRequestNumber) {
Project project = Project.findByOwnerAndProjectName(userName, projectName);
PullRequest pullRequest = PullRequest.findOne(project, pullRequestNumber);
State beforeState = pullRequest.state;
pullRequest.close();
Call call = routes.PullRequestApp.pullRequest(userName, projectName, pullRequestNumber);
addNotification(pullRequest, beforeState, State.CLOSED);