public string Format(CommitMessage commitMessage)
        {
            var commits = from commit in commitMessage.Commits
                          select new
                                     {
                                         Author = commit.Author.Name,
                                         Comment = commit.Message,
                                         URL = commit.Url,
                                         Repository = commitMessage.Repository.Name
                                     };

            var stringbuffer = new StringBuilder();
            foreach (var commit in commits)
            {
                stringbuffer.AppendLine(string.Format(template, commit.Author, commit.Repository, commit.Comment)).AppendLine();                
            }

            return stringbuffer.ToString();
        }
Example #2
0
        private void ShowBalloonTip(CommitMessage commitMessage)
        {
            var formattedMessage = messageFormatter.Format(commitMessage);
            commitURLs = commitMessage.Commits.Select(x => x.Url);

            trayIcon.BalloonTipText = formattedMessage;
            trayIcon.ShowBalloonTip(30 * 1000);
        }