Еще немного рефакторинга алгоритма распределения в Jira
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
1.0.24
|
||||
1.0.25
|
||||
|
||||
@@ -34,20 +34,11 @@ namespace JiraTimeBot.JiraIntegration
|
||||
{
|
||||
return new List<MercurialCommitItem>();
|
||||
}
|
||||
|
||||
List<Comment> comments = new List<Comment>();
|
||||
if (issue.Type?.Name != "Дубликат")
|
||||
{
|
||||
_log.Trace($"Получаю комментарии по задаче {issue.Key} ({issue.Type?.Name}).");
|
||||
comments = issue.GetCommentsAsync(cancellationToken).Result?.ToList() ?? new List<Comment>();
|
||||
}
|
||||
else
|
||||
{
|
||||
_log.Trace($"Пропускаю комментарии по задаче {issue.Key} ({issue.Type?.Name}).");
|
||||
}
|
||||
var comments = issue.GetCommentsAsync(cancellationToken).Result?.ToList() ?? new List<Comment>();
|
||||
|
||||
var user = settings.JiraUserName;
|
||||
var userComments = comments.Where(f => f.Author.Equals(user, StringComparison.InvariantCultureIgnoreCase)).ToList();
|
||||
_log.Trace($"Получены комментарии по задаче {issue.Key} ({issue.Type?.Name}): {userComments.Count}.");
|
||||
|
||||
if (userComments.Any())
|
||||
{
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using JiraTimeBot.UI;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
@@ -7,19 +9,19 @@ namespace JiraTimeBot
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
private static Mutex _mutex = new Mutex(true, "{44426B3E-B901-4792-ACEA-1385D79DBAD1}");
|
||||
private static readonly Mutex Mutex = new Mutex(true, "{44426B3E-B901-4792-ACEA-1385D79DBAD1}");
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
if (_mutex.WaitOne(TimeSpan.Zero, true))
|
||||
if (Mutex.WaitOne(TimeSpan.Zero, true))
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new frmMain());
|
||||
_mutex.ReleaseMutex();
|
||||
Mutex.ReleaseMutex();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -26,6 +26,6 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.24")]
|
||||
[assembly: AssemblyFileVersion("1.0.24")]
|
||||
[assembly: AssemblyInformationalVersion("1.0.24")]
|
||||
[assembly: AssemblyVersion("1.0.25")]
|
||||
[assembly: AssemblyFileVersion("1.0.25")]
|
||||
[assembly: AssemblyInformationalVersion("1.0.25")]
|
||||
|
||||
Reference in New Issue
Block a user