Compare commits

...
3 Commits
3 changed files with 42 additions and 34 deletions
+1 -1
View File
@@ -1 +1 @@
1.0.92 1.0.94
+3 -3
View File
@@ -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.92")] [assembly: AssemblyVersion("1.0.94")]
[assembly: AssemblyFileVersion("1.0.92")] [assembly: AssemblyFileVersion("1.0.94")]
[assembly: AssemblyInformationalVersion("1.0.92")] [assembly: AssemblyInformationalVersion("1.0.94")]
+10 -2
View File
@@ -114,7 +114,7 @@ namespace JiraTimeBot.RepositoryProviders
continue; continue;
} }
var regex = new Regex("[a-zA-Z0-9]{1,4}-[0-9]{1,6}"); var regex = new Regex("[a-zA-Z0-9]{1,5}-[0-9]{1,6}");
var branch = ListBranchesContainsCommit(repo, commit.Sha) var branch = ListBranchesContainsCommit(repo, commit.Sha)
.Select(f => f.FriendlyName) .Select(f => f.FriendlyName)
.FirstOrDefault(f => regex.IsMatch(f)); .FirstOrDefault(f => regex.IsMatch(f));
@@ -200,7 +200,15 @@ namespace JiraTimeBot.RepositoryProviders
foreach (var branch in repo.Branches) foreach (var branch in repo.Branches)
{ {
var commits = repo.Commits.QueryBy(new CommitFilter { IncludeReachableFrom = branch }).Where(c => c.Sha == commitSha); List<Commit> commits = new List<Commit>();
try
{
commits = repo.Commits.QueryBy(new CommitFilter {IncludeReachableFrom = branch}).Where(c => c.Sha == commitSha).ToList();
}
catch (Exception)
{
continue;
}
if (!commits.Any()) if (!commits.Any())
{ {