Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
387d53b928 | ||
|
|
df63a96d3e |
+1
-1
@@ -1 +1 @@
|
|||||||
1.0.76
|
1.0.78
|
||||||
|
|||||||
@@ -108,10 +108,13 @@ namespace JiraTimeBot.Mercurial
|
|||||||
}
|
}
|
||||||
|
|
||||||
var commitMessage = commit.MessageShort;
|
var commitMessage = commit.MessageShort;
|
||||||
|
commitMessage = _technicalInfoSkipper.StripBranchPrefix(branch, commitMessage);
|
||||||
|
|
||||||
if (_commitSkipper.IsNeedToSkip(branch, commitMessage))
|
if (_commitSkipper.IsNeedToSkip(branch, commitMessage))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
commitMessage = _technicalInfoSkipper.StripTechnicalInfo(commitMessage);
|
commitMessage = _technicalInfoSkipper.StripTechnicalInfo(commitMessage);
|
||||||
var files = FilesToMerge(commit, repo);
|
var files = FilesToMerge(commit, repo);
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace JiraTimeBot.Mercurial.Modifiers
|
|||||||
//Пропускаем Close и Merge коммиты
|
//Пропускаем Close и Merge коммиты
|
||||||
if (commitMessage.StartsWith($"Close {branch}", StringComparison.InvariantCultureIgnoreCase) ||
|
if (commitMessage.StartsWith($"Close {branch}", StringComparison.InvariantCultureIgnoreCase) ||
|
||||||
commitMessage.StartsWith($"Merge with", StringComparison.InvariantCultureIgnoreCase) ||
|
commitMessage.StartsWith($"Merge with", StringComparison.InvariantCultureIgnoreCase) ||
|
||||||
commitMessage.StartsWith($"Merged master into", StringComparison.InvariantCultureIgnoreCase) ||
|
commitMessage.StartsWith($"Merged", StringComparison.InvariantCultureIgnoreCase) ||
|
||||||
commitMessage.StartsWith($"Merge branch", StringComparison.InvariantCultureIgnoreCase))
|
commitMessage.StartsWith($"Merge branch", StringComparison.InvariantCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
{
|
{
|
||||||
public interface ITechnicalInfoSkipper
|
public interface ITechnicalInfoSkipper
|
||||||
{
|
{
|
||||||
|
string StripBranchPrefix(string branch, string commitMessage);
|
||||||
string StripTechnicalInfo(string commitMessage);
|
string StripTechnicalInfo(string commitMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,26 @@
|
|||||||
using System.Text;
|
using System;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
namespace JiraTimeBot.Mercurial.Modifiers
|
namespace JiraTimeBot.Mercurial.Modifiers
|
||||||
{
|
{
|
||||||
public class TechnicalInfoSkipper : ITechnicalInfoSkipper
|
public class TechnicalInfoSkipper : ITechnicalInfoSkipper
|
||||||
{
|
{
|
||||||
|
public string StripBranchPrefix(string branch, string commitMessage)
|
||||||
|
{
|
||||||
|
if (commitMessage.StartsWith(branch, StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
{
|
||||||
|
return commitMessage.TrimStart(branch.ToCharArray()).Trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
var quotedBranch = $"[{branch}]";
|
||||||
|
if (commitMessage.StartsWith(quotedBranch, StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
{
|
||||||
|
return commitMessage.TrimStart(quotedBranch.ToCharArray()).Trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
return commitMessage;
|
||||||
|
}
|
||||||
|
|
||||||
public string StripTechnicalInfo(string commitMessage)
|
public string StripTechnicalInfo(string commitMessage)
|
||||||
{
|
{
|
||||||
if (!commitMessage.Contains("Signed-by:"))
|
if (!commitMessage.Contains("Signed-by:"))
|
||||||
|
|||||||
@@ -26,6 +26,6 @@ using System.Runtime.InteropServices;
|
|||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("1.0.76")]
|
[assembly: AssemblyVersion("1.0.78")]
|
||||||
[assembly: AssemblyFileVersion("1.0.76")]
|
[assembly: AssemblyFileVersion("1.0.78")]
|
||||||
[assembly: AssemblyInformationalVersion("1.0.76")]
|
[assembly: AssemblyInformationalVersion("1.0.78")]
|
||||||
|
|||||||
Reference in New Issue
Block a user