Skip to content

Commit

Permalink
[FIXED JENKINS-11419] support custom build names
Browse files Browse the repository at this point in the history
  • Loading branch information
kutzi committed Oct 26, 2011
1 parent aba6c68 commit 8241564
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Expand Up @@ -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");
}
}
Expand Down
Expand Up @@ -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
Expand All @@ -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)));
Expand Down
@@ -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

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.