File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/main/java/org/jenkinsci/plugins/pipeline/github/trigger Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,6 @@ protected void onEvent(final GHSubscriberEvent event) {
7575 }
7676
7777 private void handleIssueComment (final GHSubscriberEvent event ) {
78- GHEventPayload .IssueComment issueCommentEvent ;
79-
8078 // we only care about created or updated events
8179 switch (event .getType ()) {
8280 case CREATED :
@@ -87,6 +85,7 @@ private void handleIssueComment(final GHSubscriberEvent event) {
8785 }
8886
8987 // decode payload
88+ final GHEventPayload .IssueComment issueCommentEvent ;
9089 try {
9190 issueCommentEvent = GitHub .offline ()
9291 .parseEventPayload (new StringReader (event .getPayload ()), GHEventPayload .IssueComment .class );
@@ -95,6 +94,16 @@ private void handleIssueComment(final GHSubscriberEvent event) {
9594 return ;
9695 }
9796
97+ switch (issueCommentEvent .getAction ()) {
98+ case "created" :
99+ case "edited" :
100+ break ;
101+ default :
102+ LOG .debug ("Ignoring IssueComment: {} with Action: {}" ,
103+ issueCommentEvent .getComment (), issueCommentEvent .getAction ());
104+ return ;
105+ }
106+
98107 // create key for this comment's PR
99108 final String key = String .format ("%s/%s/%d" ,
100109 issueCommentEvent .getRepository ().getOwnerName (),
You can’t perform that action at this time.
0 commit comments