Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eff1bff375 | ||
|
|
d8a47b7cd3 | ||
|
|
95ce2792d9 | ||
|
|
9f95e918f7 |
+1
-1
@@ -1 +1 @@
|
|||||||
1.0.84
|
1.0.86
|
||||||
|
|||||||
@@ -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.84")]
|
[assembly: AssemblyVersion("1.0.86")]
|
||||||
[assembly: AssemblyFileVersion("1.0.84")]
|
[assembly: AssemblyFileVersion("1.0.86")]
|
||||||
[assembly: AssemblyInformationalVersion("1.0.84")]
|
[assembly: AssemblyInformationalVersion("1.0.86")]
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace JiraTimeBot.RepositoryProviders
|
namespace JiraTimeBot.RepositoryProviders
|
||||||
@@ -77,7 +78,11 @@ namespace JiraTimeBot.RepositoryProviders
|
|||||||
var reflog = repo.Refs.Log(repo.Refs.Head);
|
var reflog = repo.Refs.Log(repo.Refs.Head);
|
||||||
foreach (var reflogItem in reflog)
|
foreach (var reflogItem in reflog)
|
||||||
{
|
{
|
||||||
if (reflogItem.Committer.When.Date != date.Value.Date || reflogItem.Committer.Email != settings.MercurialAuthorEmail)
|
|
||||||
|
var dateMatch = date.Value.Date == reflogItem.Committer.When.Date;
|
||||||
|
var userMatch = reflogItem.Committer.Email.Equals(settings.MercurialAuthorEmail, StringComparison.CurrentCultureIgnoreCase);
|
||||||
|
|
||||||
|
if (!dateMatch || !userMatch)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -100,13 +105,20 @@ namespace JiraTimeBot.RepositoryProviders
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var branch = ListBranchesContaininingCommit(repo, commit.Sha).Select(f => f.FriendlyName)
|
var regex = new Regex("[a-zA-Z]{1,4}-[0-9]{1,6}");
|
||||||
.Where(f => f.Contains("-") && !f.Contains("/")).Distinct().FirstOrDefault();
|
var branch = ListBranchesContaininingCommit(repo, commit.Sha)
|
||||||
|
.Select(f => f.FriendlyName)
|
||||||
|
.FirstOrDefault(f => regex.IsMatch(f));
|
||||||
|
|
||||||
|
|
||||||
|
//.Where(f => f.Contains("-") && !f.Contains("/")).Distinct().FirstOrDefault();
|
||||||
if (branch == null)
|
if (branch == null)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
branch = regex.Match(branch).Value;
|
||||||
|
|
||||||
var commitMessage = commit.MessageShort;
|
var commitMessage = commit.MessageShort;
|
||||||
commitMessage = _technicalInfoSkipper.StripBranchPrefix(branch, commitMessage);
|
commitMessage = _technicalInfoSkipper.StripBranchPrefix(branch, commitMessage);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user