We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9570aa9 commit c68cf99Copy full SHA for c68cf99
src/main/java/com/lpvs/util/LPVSPayloadUtil.java
@@ -195,8 +195,12 @@ public static boolean checkPayload(String payload) {
195
196
Gson gson = new Gson();
197
JsonObject json = gson.fromJson(payload, JsonObject.class);
198
+ if (json == null || json.get("action") == null) {
199
+ log.error("'action' field is not presented in the payload.");
200
+ return false;
201
+ }
202
String actionString = json.get("action").getAsString();
- log.debug("Action " + actionString);
203
+ log.debug("Action {}", actionString);
204
LPVSPullRequestAction action = LPVSPullRequestAction.convertFrom(actionString);
205
return (action != null)
206
&& (action.equals(LPVSPullRequestAction.UPDATE)
0 commit comments