diff --git a/src/main/java/com/dabsquared/gitlabjenkins/util/CommitStatusUpdater.java b/src/main/java/com/dabsquared/gitlabjenkins/util/CommitStatusUpdater.java index f263177..540e672 100644 --- a/src/main/java/com/dabsquared/gitlabjenkins/util/CommitStatusUpdater.java +++ b/src/main/java/com/dabsquared/gitlabjenkins/util/CommitStatusUpdater.java @@ -64,7 +64,9 @@ public class CommitStatusUpdater { } private static String getBuildRevision(Run build) { - return build.getAction(BuildData.class).getLastBuiltRevision().getSha1String(); + BuildData action = build.getAction(BuildData.class); + + return action.getLastBuild(action.getLastBuiltRevision().getSha1()).getMarked().getSha1String(); } private static boolean existsCommit(GitLabApi client, String gitlabProjectId, String commitHash) {