Skip to content
Permalink
Browse files
[FIXED JENKINS-11419] support custom build names
  • Loading branch information
kutzi committed Oct 26, 2011
1 parent aba6c68 commit 8241564a92d342259ae4c95b1467b45998fb0188
@@ -32,8 +32,8 @@ public String buildStartMessage(IMPublisher publisher, AbstractBuild<?, ?> build
if (build.getPreviousBuild().getResult().isWorseThan(Result.SUCCESS)) {
AbstractBuild<?, ?> lastSuccessfulBuild = BuildHelper.getPreviousSuccessfulBuild(build);
if (lastSuccessfulBuild != null) {
sb.append(" -- last ").append(Result.SUCCESS).append(" #")
.append(lastSuccessfulBuild.getNumber())
sb.append(" -- last ").append(Result.SUCCESS).append(" ")
.append(lastSuccessfulBuild.getDisplayName())
.append(" ").append(lastSuccessfulBuild.getTimestampString()).append(" ago");
}
}
@@ -24,7 +24,7 @@ public SummaryOnlyBuildToChatNotifier() {

@Override
public String buildStartMessage(IMPublisher publisher, AbstractBuild<?, ?> build, BuildListener listener) throws IOException, InterruptedException {
return Messages.SummaryOnlyBuildToChatNotifier_StartMessage(build.getNumber(),getProjectName(build));
return Messages.SummaryOnlyBuildToChatNotifier_StartMessage(build.getDisplayName(),getProjectName(build));
}

@Override
@@ -36,7 +36,7 @@ public String buildCompletionMessage(IMPublisher publisher, AbstractBuild<?, ?>
sb = new StringBuilder();
}
sb.append(Messages.SummaryOnlyBuildToChatNotifier_Summary(
getProjectName(build), build.getNumber(),
getProjectName(build), build.getDisplayName(),
BuildHelper.getResultDescription(build),
build.getTimestampString(),
MessageHelper.getBuildURL(build)));
@@ -1,3 +1,3 @@
SummaryOnlyBuildToChatNotifier.Summary=Project {0} build #{1}: {2} in {3}: {4}
SummaryOnlyBuildToChatNotifier.Summary=Project {0} build {1}: {2} in {3}: {4}
SummaryOnlyBuildToChatNotifier.BuildIsFixed=Yippie, build fixed!\n
SummaryOnlyBuildToChatNotifier.StartMessage=Starting build {0} for job {1}

2 comments on commit 8241564

@OndraZizka
Copy link

@OndraZizka OndraZizka commented on 8241564 Jun 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, is this code currently in the released versions? I still see the number rather than the name.

@kutzi
Copy link
Member Author

@kutzi kutzi commented on 8241564 Jun 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, since instant-messaging 1.20 - 4 1/2 years ago

Please sign in to comment.