use of com.google.gerrit.server.project.ProjectResource in project gerrit by GerritCodeReview.
the class BanCommitCommand method run.
@Override
protected void run() throws Failure {
try {
BanCommit.Input input = BanCommit.Input.fromCommits(Lists.transform(commitsToBan, ObjectId::getName));
input.reason = reason;
BanResultInfo r = banCommit.apply(new ProjectResource(projectControl), input);
printCommits(r.newlyBanned, "The following commits were banned");
printCommits(r.alreadyBanned, "The following commits were already banned");
printCommits(r.ignored, "The following ids do not represent commits and were ignored");
} catch (RestApiException | IOException e) {
throw die(e);
}
}
Aggregations