diff --git a/src/JiraTimeBot/JiraIntegration/Comments/JiraDescriptionSource.cs b/src/JiraTimeBot/JiraIntegration/Comments/JiraDescriptionSource.cs index b81df7f..5e772db 100644 --- a/src/JiraTimeBot/JiraIntegration/Comments/JiraDescriptionSource.cs +++ b/src/JiraTimeBot/JiraIntegration/Comments/JiraDescriptionSource.cs @@ -1,32 +1,13 @@ using JiraTimeBot.Configuration; using JiraTimeBot.TaskTime.Objects; -using System; -using System.Collections.Generic; -using System.Linq; namespace JiraTimeBot.JiraIntegration.Comments { public class JiraDescriptionSource : IJiraDescriptionSource { - private readonly List _dummyComments = new List - { - "Написание кода", "написание кода", "программирование", "реализация задачи", "кодинг", "код + тесты", - "кодинг", "написание кода и тестов" - }; - public string GetDescription(TaskTimeItem taskTimeItem, bool addCommentsToWorklog, Settings settings) { - if (addCommentsToWorklog) - { - return taskTimeItem.Description; - } - - if (settings.WorkType == WorkType.Mercurial) - { - return _dummyComments.OrderBy(f => Guid.NewGuid()).FirstOrDefault(); - } - - return ""; + return addCommentsToWorklog ? taskTimeItem.Description : ""; } } } \ No newline at end of file diff --git a/src/JiraTimeBot/Mercurial/MercurialLog.cs b/src/JiraTimeBot/Mercurial/MercurialLog.cs index 5b91236..ecaead3 100644 --- a/src/JiraTimeBot/Mercurial/MercurialLog.cs +++ b/src/JiraTimeBot/Mercurial/MercurialLog.cs @@ -82,6 +82,7 @@ namespace JiraTimeBot.Mercurial TimeSpent = TimeSpan.Zero, Type = GetCommitType(changeset.Branch) }; + if (task.Type == CommitType.Release && task.Description.StartsWith("Merge with", StringComparison.CurrentCultureIgnoreCase)) { var branch = task.Description.Replace("Merge with", "").Replace(" ", "");