Add HTTP response code 'SC_ACCEPTED' (202) as success case in response handler

Most of the webhook receivers return HTTP response code '202' when they receive payload successfully. One of the example is 'tekton pipelines'.

We intend to add HTTP response code '202' as success case for gerrit webhook response handler

Change-Id: I156dced45c7a1e4ff08b67df0fd68b211b5f5b10
Signed-off-by: Ali Raza <dev.aliraza@gmail.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/webhooks/HttpResponseHandler.java b/src/main/java/com/googlesource/gerrit/plugins/webhooks/HttpResponseHandler.java
index 0c5bd24..11fc604 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/webhooks/HttpResponseHandler.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/webhooks/HttpResponseHandler.java
@@ -17,6 +17,7 @@
 import static javax.servlet.http.HttpServletResponse.SC_CREATED;
 import static javax.servlet.http.HttpServletResponse.SC_NO_CONTENT;
 import static javax.servlet.http.HttpServletResponse.SC_OK;
+import static javax.servlet.http.HttpServletResponse.SC_ACCEPTED;
 
 import com.google.common.flogger.FluentLogger;
 import com.googlesource.gerrit.plugins.webhooks.HttpResponseHandler.HttpResult;
@@ -47,7 +48,7 @@
 
   private boolean isSuccessful(HttpResponse response) {
     int sc = response.getStatusLine().getStatusCode();
-    return sc == SC_CREATED || sc == SC_NO_CONTENT || sc == SC_OK;
+    return sc == SC_CREATED || sc == SC_ACCEPTED || sc == SC_NO_CONTENT || sc == SC_OK;
   }
 
   private String parseResponse(HttpResponse response) {