use of com.github.legman.Subscribe in project scm-review-plugin by scm-manager.
the class MergeObstacleCheckHook method checkForObstacles.
@Subscribe(async = false)
public void checkForObstacles(PreReceiveRepositoryHookEvent event) {
HookContext context = event.getContext();
Repository repository = event.getRepository();
if (ignoreHook(context, repository)) {
return;
}
List<PullRequest> pullRequests = pullRequestService.getAll(repository.getNamespace(), repository.getName());
new Worker(event).process(pullRequests);
}
use of com.github.legman.Subscribe in project scm-review-plugin by scm-manager.
the class StatusCheckHook method checkStatus.
@Subscribe(async = false)
public void checkStatus(PostReceiveRepositoryHookEvent event) {
Repository repository = event.getRepository();
if (ignoreHook(event.getContext(), repository)) {
return;
}
List<PullRequest> pullRequests = pullRequestService.getAll(repository.getNamespace(), repository.getName());
new Worker(event).process(pullRequests);
}
use of com.github.legman.Subscribe in project scm-review-plugin by scm-manager.
the class CommentService method addCommentOnEmergencyMerge.
@Subscribe
public void addCommentOnEmergencyMerge(PullRequestEmergencyMergedEvent mergedEvent) {
PullRequest pullRequest = mergedEvent.getPullRequest();
Comment comment = new Comment();
comment.setEmergencyMerged(true);
comment.setComment(pullRequest.getOverrideMessage());
addWithoutPermissionCheck(mergedEvent.getRepository(), pullRequest.getId(), comment);
}
use of com.github.legman.Subscribe in project scm-review-plugin by scm-manager.
the class EmailNotificationHook method handleUpdatedPullRequest.
@Subscribe
public void handleUpdatedPullRequest(PullRequestUpdatedEvent event) {
PullRequest pullRequest = event.getPullRequest();
handleEvent(event, new PullRequestUpdatedMailTextResolver(event), pullRequest, getSubscribersWithoutCurrentUser(pullRequest));
}
use of com.github.legman.Subscribe in project scm-review-plugin by scm-manager.
the class EmailNotificationHook method handlePullRequestApproval.
@Subscribe
public void handlePullRequestApproval(PullRequestApprovalEvent event) {
PullRequest pullRequest = event.getPullRequest();
handleEvent(event, new PullRequestApprovalMailTextResolver(event), pullRequest, getSubscribersWithoutCurrentUser(pullRequest));
}
Aggregations