use of com.google.gerrit.extensions.events.CommentAddedListener in project gerrit by GerritCodeReview.
the class CommentAddedEventIT method setUp.
@Before
public void setUp() throws Exception {
ProjectConfig cfg = projectCache.checkedGet(project).getConfig();
AccountGroup.UUID anonymousUsers = systemGroupBackend.getGroup(ANONYMOUS_USERS).getUUID();
Util.allow(cfg, Permission.forLabel(label.getName()), -1, 1, anonymousUsers, "refs/heads/*");
Util.allow(cfg, Permission.forLabel(pLabel.getName()), 0, 1, anonymousUsers, "refs/heads/*");
saveProjectConfig(project, cfg);
eventListenerRegistration = source.add(new CommentAddedListener() {
@Override
public void onCommentAdded(Event event) {
lastCommentAddedEvent = event;
}
});
}
use of com.google.gerrit.extensions.events.CommentAddedListener in project gerrit by GerritCodeReview.
the class CustomLabelIT method setUp.
@Before
public void setUp() throws Exception {
ProjectConfig cfg = projectCache.checkedGet(project).getConfig();
AccountGroup.UUID anonymousUsers = systemGroupBackend.getGroup(ANONYMOUS_USERS).getUUID();
Util.allow(cfg, Permission.forLabel(label.getName()), -1, 1, anonymousUsers, "refs/heads/*");
Util.allow(cfg, Permission.forLabel(P.getName()), 0, 1, anonymousUsers, "refs/heads/*");
saveProjectConfig(project, cfg);
eventListenerRegistration = source.add(new CommentAddedListener() {
@Override
public void onCommentAdded(Event event) {
lastCommentAddedEvent = event;
}
});
}
Aggregations