diff --git a/src/main/java/com/dabsquared/gitlabjenkins/gitlab/api/impl/V3GitLabApiProxy.java b/src/main/java/com/dabsquared/gitlabjenkins/gitlab/api/impl/V3GitLabApiProxy.java index 5270e02..784b01f 100644 --- a/src/main/java/com/dabsquared/gitlabjenkins/gitlab/api/impl/V3GitLabApiProxy.java +++ b/src/main/java/com/dabsquared/gitlabjenkins/gitlab/api/impl/V3GitLabApiProxy.java @@ -123,11 +123,11 @@ interface V3GitLabApiProxy extends GitLabApiProxy { @POST @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_FORM_URLENCODED) - @Path("/projects/{projectId}/merge_requests/{mergeRequestId}/notes") + @Path("/projects/{projectId}/pull_request/{mergeRequestId}/comments") @Override void createMergeRequestNote(@PathParam("projectId") Integer projectId, @PathParam("mergeRequestId") Integer mergeRequestId, - @FormParam("body") String body); + @FormParam("note") String note); @GET @Produces(MediaType.APPLICATION_JSON) diff --git a/src/main/java/com/dabsquared/gitlabjenkins/trigger/handler/merge/MergeRequestHookTriggerHandlerImpl.java b/src/main/java/com/dabsquared/gitlabjenkins/trigger/handler/merge/MergeRequestHookTriggerHandlerImpl.java index bfd711e..4804767 100644 --- a/src/main/java/com/dabsquared/gitlabjenkins/trigger/handler/merge/MergeRequestHookTriggerHandlerImpl.java +++ b/src/main/java/com/dabsquared/gitlabjenkins/trigger/handler/merge/MergeRequestHookTriggerHandlerImpl.java @@ -171,7 +171,7 @@ class MergeRequestHookTriggerHandlerImpl extends AbstractWebHookTriggerHandler project, MergeRequestHook hook) { MergeRequestObjectAttributes objectAttributes = hook.getObjectAttributes(); - if (objectAttributes != null && hook.getAction() == Action.approved) { + if (hook != null && hook.getAction() == Action.approved) { LOGGER.log(Level.FINEST, "Skipping LastCommitNotYetBuild check for approve action"); return true; }