PR触发构建后,将构建结果评论至原PR
This commit is contained in:
parent
128c5673c7
commit
b87f0b6e15
|
@ -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)
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue