Убраны статичные комментарии
This commit is contained in:
@@ -1,32 +1,13 @@
|
|||||||
using JiraTimeBot.Configuration;
|
using JiraTimeBot.Configuration;
|
||||||
using JiraTimeBot.TaskTime.Objects;
|
using JiraTimeBot.TaskTime.Objects;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace JiraTimeBot.JiraIntegration.Comments
|
namespace JiraTimeBot.JiraIntegration.Comments
|
||||||
{
|
{
|
||||||
public class JiraDescriptionSource : IJiraDescriptionSource
|
public class JiraDescriptionSource : IJiraDescriptionSource
|
||||||
{
|
{
|
||||||
private readonly List<string> _dummyComments = new List<string>
|
|
||||||
{
|
|
||||||
"Написание кода", "написание кода", "программирование", "реализация задачи", "кодинг", "код + тесты",
|
|
||||||
"кодинг", "написание кода и тестов"
|
|
||||||
};
|
|
||||||
|
|
||||||
public string GetDescription(TaskTimeItem taskTimeItem, bool addCommentsToWorklog, Settings settings)
|
public string GetDescription(TaskTimeItem taskTimeItem, bool addCommentsToWorklog, Settings settings)
|
||||||
{
|
{
|
||||||
if (addCommentsToWorklog)
|
return addCommentsToWorklog ? taskTimeItem.Description : "";
|
||||||
{
|
|
||||||
return taskTimeItem.Description;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (settings.WorkType == WorkType.Mercurial)
|
|
||||||
{
|
|
||||||
return _dummyComments.OrderBy(f => Guid.NewGuid()).FirstOrDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -82,6 +82,7 @@ namespace JiraTimeBot.Mercurial
|
|||||||
TimeSpent = TimeSpan.Zero,
|
TimeSpent = TimeSpan.Zero,
|
||||||
Type = GetCommitType(changeset.Branch)
|
Type = GetCommitType(changeset.Branch)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (task.Type == CommitType.Release && task.Description.StartsWith("Merge with", StringComparison.CurrentCultureIgnoreCase))
|
if (task.Type == CommitType.Release && task.Description.StartsWith("Merge with", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
var branch = task.Description.Replace("Merge with", "").Replace(" ", "");
|
var branch = task.Description.Replace("Merge with", "").Replace(" ", "");
|
||||||
|
|||||||
Reference in New Issue
Block a user