Change order of steps add note and accept MR

- adding the jenkins build status note before accepting the MR makes more sense
This commit is contained in:
Robin Müller 2016-06-07 20:07:52 +02:00
parent 58c9048101
commit 10226d9c53
1 changed files with 2 additions and 2 deletions

View File

@ -32,11 +32,11 @@ public class GitLabMergeRequestRunListener extends RunListener<Run<?, ?>> {
Result buildResult = build.getResult();
Integer projectId = cause.getData().getProjectId();
Integer mergeRequestId = cause.getData().getMergeRequestId();
addNoteOnMergeRequestIfNecessary(build, trigger, listener, projectId.toString(), mergeRequestId, build.getParent().getDisplayName(), build.getNumber(),
buildUrl, getResultIcon(trigger, buildResult), buildResult.color.getDescription());
if (buildResult == Result.SUCCESS) {
acceptMergeRequestIfNecessary(build, trigger, listener, projectId.toString(), mergeRequestId);
}
addNoteOnMergeRequestIfNecessary(build, trigger, listener, projectId.toString(), mergeRequestId, build.getParent().getDisplayName(), build.getNumber(),
buildUrl, getResultIcon(trigger, buildResult), buildResult.color.getDescription());
}
}