Ejemplo n.º 1
0
 public void HandleBuildStatusChange(BuildStatusChangeEvent buildStatusChangedEvent)
 {
     var teamProjectMapping = FindTeamProjectMapping(buildStatusChangedEvent.TeamProject);
     if (!string.IsNullOrEmpty(buildStatusChangedEvent.StatusChange.NewValue))
     {
         _hipChatNotifier.SendBuildStatusChangedNotification(
             buildStatusChangedEvent, teamProjectMapping.HipChatRoomId);
     }
 }
Ejemplo n.º 2
0
 public void SendBuildStatusChangedNotification(BuildStatusChangeEvent buildStatusChangedEvent, int roomId)
 {
     var changedBy = GetDisplayNameFromUsername(buildStatusChangedEvent.ChangedBy)
         ?? buildStatusChangedEvent.ChangedBy;
     var message = string.Format("{0} - Build <a href='{1}'>{2}</a> queued for deploy to <i>{3}</i>",
         changedBy,
         buildStatusChangedEvent.Url,
         buildStatusChangedEvent.Id,
         buildStatusChangedEvent.StatusChange.NewValue);
     _hipChatClient.From = GetFromValue("Deploy");
     _hipChatClient.RoomId = roomId;
     _hipChatClient.SendMessage(message, HipChatClient.BackgroundColor.green);
 }