Skip to content
Permalink
Browse files

Merge pull request #302 from tyroneabdy/master

[JENKINS-40059] CommentAdded trigger firing on every comment
  • Loading branch information...
rsandell committed Apr 11, 2017
2 parents b0b2c86 + 0a8e1c2 commit a36413b2b88ec89e0e525c08bade676f74e34048
@@ -1036,14 +1036,18 @@ private boolean isServerInteresting(GerritTriggeredEvent event) {
* Gerrit stream events changed to append approval info to
* every comment-added event.
**/
if (approval.isUpdated()
&& approval.getType().equals(
commentAdded.getVerdictCategory())
&& (approval.getValue().equals(
commentAdded.getCommentAddedTriggerApprovalValue())
|| ("+" + approval.getValue()).equals(
commentAdded.getCommentAddedTriggerApprovalValue()))) {
return true;
if (GerritVersionChecker.isCorrectVersion(
GerritVersionChecker.Feature.commentAlwaysApproval,
serverName)) {
if (approval.isUpdated()
&& approval.getType().equals(
commentAdded.getVerdictCategory())
&& (approval.getValue().equals(
commentAdded.getCommentAddedTriggerApprovalValue())
|| ("+" + approval.getValue()).equals(
commentAdded.getCommentAddedTriggerApprovalValue()))) {
return true;
}
} else {
if (approval.getType().equals(
commentAdded.getVerdictCategory())
@@ -60,7 +60,13 @@
/**
* Project created events, added in Gerrit 2.12.
*/
projectCreatedEvents("Project created events", "2.12");
projectCreatedEvents("Project created events", "2.12"),


/**
* Gerrit CommentAdded always contains approval information, added in Gerrit 2.13.
*/
commentAlwaysApproval("CommentAdded always contains approval", "2.13");

private final String displayName;
private final String version;

0 comments on commit a36413b

Please sign in to comment.
You can’t perform that action at this time.