fix format notify PipelineNotify
This commit is contained in:
parent
050ab4eaa7
commit
d6512a695c
@ -28,19 +28,21 @@ public class PipelineNotifyGenerator implements NotifyBoxAnswerGenerator<Pipelin
|
||||
final StringBuilder builder = new StringBuilder(Icons.BUILD).append(" *New pipeline | ").append(notify.getPipelineId()).append("*");
|
||||
|
||||
builder
|
||||
.append(Icons.HR)
|
||||
.append(notify.getOldStatus().getIcon()).append(" ").append(notify.getOldStatus()).append(Icons.ARROW).append(notify.getNewStatus().getIcon()).append(" ").append(notify.getNewStatus())
|
||||
.append(Icons.HR);
|
||||
|
||||
final Optional<String> optProjectName = projectService.getProjectNameById(notify.getProjectId())
|
||||
.map(Strings::escapeMarkdown);
|
||||
|
||||
if (optProjectName.isPresent()) {
|
||||
final String projectName = optProjectName.get();
|
||||
builder.append(Icons.PROJECT).append(": ").append(projectName).append("\n");
|
||||
}
|
||||
|
||||
builder
|
||||
.append(Icons.TREE).append(": ").append(notify.getRefName());
|
||||
.append(Icons.TREE).append(": ").append(notify.getRefName())
|
||||
.append(Icons.HR)
|
||||
.append(notify.getOldStatus().getIcon()).append(" ").append(notify.getOldStatus()).append(Icons.ARROW).append(notify.getNewStatus().getIcon()).append(" ").append(notify.getNewStatus());
|
||||
|
||||
|
||||
return BoxAnswer.builder()
|
||||
.message(builder.toString())
|
||||
|
Loading…
Reference in New Issue
Block a user