PR触发构建后,将构建结果评论至原PR

This commit is contained in:
yashin 2018-06-28 19:14:35 +08:00
parent 128c5673c7
commit b87f0b6e15
2 changed files with 3 additions and 3 deletions

View File

@ -123,11 +123,11 @@ interface V3GitLabApiProxy extends GitLabApiProxy {
@POST @POST
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Path("/projects/{projectId}/merge_requests/{mergeRequestId}/notes") @Path("/projects/{projectId}/pull_request/{mergeRequestId}/comments")
@Override @Override
void createMergeRequestNote(@PathParam("projectId") Integer projectId, void createMergeRequestNote(@PathParam("projectId") Integer projectId,
@PathParam("mergeRequestId") Integer mergeRequestId, @PathParam("mergeRequestId") Integer mergeRequestId,
@FormParam("body") String body); @FormParam("note") String note);
@GET @GET
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)

View File

@ -171,7 +171,7 @@ class MergeRequestHookTriggerHandlerImpl extends AbstractWebHookTriggerHandler<M
private boolean isLastCommitNotYetBuild(Job<?, ?> project, MergeRequestHook hook) { private boolean isLastCommitNotYetBuild(Job<?, ?> project, MergeRequestHook hook) {
MergeRequestObjectAttributes objectAttributes = hook.getObjectAttributes(); 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"); LOGGER.log(Level.FINEST, "Skipping LastCommitNotYetBuild check for approve action");
return true; return true;
} }