diff --git a/.semver.txt b/.semver.txt index 4ad595c..f683e66 100644 --- a/.semver.txt +++ b/.semver.txt @@ -1 +1 @@ -1.0.42 +1.0.43 diff --git a/src/JiraTimeBot/JiraIntegration/JiraApi.cs b/src/JiraTimeBot/JiraIntegration/JiraApi.cs index 89f71fa..0b7afa3 100644 --- a/src/JiraTimeBot/JiraIntegration/JiraApi.cs +++ b/src/JiraTimeBot/JiraIntegration/JiraApi.cs @@ -145,7 +145,15 @@ namespace JiraTimeBot.JiraIntegration } if (!dummy) { - issue.DeleteWorklogAsync(workLog, token: cancellationToken); + try + { + issue.DeleteWorklogAsync(workLog, token: cancellationToken); + } + catch (Exception ex) + { + _log.Error($"Не могу удалить Worklog по задаче {taskTimeItem.Branch}: {ex.Message}."); + continue; + } } hasTodayWorklog = false; } @@ -163,7 +171,15 @@ namespace JiraTimeBot.JiraIntegration Worklog workLogToAdd = new Worklog(timeSpentJira, date.Value, comment); if (!dummy) { - workLogToAdd = issue.AddWorklogAsync(workLogToAdd, token: cancellationToken).Result; + try + { + workLogToAdd = issue.AddWorklogAsync(workLogToAdd, token: cancellationToken).Result; + } + catch (Exception ex) + { + _log.Error($"Не могу добавить Worklog по задаче {taskTimeItem.Branch}: {ex.Message}."); + continue; + } } _log.Trace($"Добавили Worklog для {taskTimeItem.Branch}: {workLogToAdd.Author} {workLogToAdd.CreateDate}: {workLogToAdd.TimeSpent}"); } diff --git a/src/JiraTimeBot/JiraIntegration/JiraCommitEmulator.cs b/src/JiraTimeBot/JiraIntegration/JiraCommitEmulator.cs index db31fcf..5aa84c0 100644 --- a/src/JiraTimeBot/JiraIntegration/JiraCommitEmulator.cs +++ b/src/JiraTimeBot/JiraIntegration/JiraCommitEmulator.cs @@ -37,7 +37,7 @@ namespace JiraTimeBot.JiraIntegration var comments = issue.GetCommentsAsync(cancellationToken).Result?.ToList() ?? new List(); var user = settings.JiraUserName; - //user = "Zoya.Aleksandridi"; + user = "Zoya.Aleksandridi"; var userComments = comments.Where(f => f.Author.Equals(user, StringComparison.InvariantCultureIgnoreCase)).ToList(); _log.Trace($"Получены комментарии по задаче {issue.Key} ({issue.Type?.Name}): {userComments.Count}."); diff --git a/src/JiraTimeBot/Properties/AssemblyInfo.cs b/src/JiraTimeBot/Properties/AssemblyInfo.cs index 3581eaa..f558683 100644 --- a/src/JiraTimeBot/Properties/AssemblyInfo.cs +++ b/src/JiraTimeBot/Properties/AssemblyInfo.cs @@ -1,31 +1,31 @@ -using System.Reflection; -using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("JiraTimeBot")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("JiraTimeBot")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("f3b89316-c38c-4ce6-9d88-0b1373cfba1a")] -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// 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.42")] -[assembly: AssemblyFileVersion("1.0.42")] -[assembly: AssemblyInformationalVersion("1.0.42")] +using System.Reflection; +using System.Runtime.InteropServices; +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("JiraTimeBot")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("JiraTimeBot")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f3b89316-c38c-4ce6-9d88-0b1373cfba1a")] +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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.43")] +[assembly: AssemblyFileVersion("1.0.43")] +[assembly: AssemblyInformationalVersion("1.0.43")]