Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
34b8d2638e | ||
|
|
9d665f6b30 | ||
|
|
1210b424e9 | ||
|
|
9dc7b18b0b | ||
|
|
14e6f8a317 | ||
|
|
2a3f73b207 | ||
|
|
6505013a0b |
+1
-1
@@ -1 +1 @@
|
|||||||
1.0.89
|
1.0.94
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
- Путь до репо (Режим Mercurial, Git) - путь до папки, в которую клонируются исходники.
|
- Путь до репо (Режим Mercurial, Git) - путь до папки, в которую клонируются исходники.
|
||||||
- Jira URL - адрес Jira-сервреа.
|
- Jira URL - адрес Jira-сервреа.
|
||||||
- Логин Jira - Логин в Jira (от этого пользователя будем выполнять запросы и вносить время).
|
- Логин Jira - Логин в Jira (от этого пользователя будем выполнять запросы и вносить время).
|
||||||
- Пароль Jira - шифруется через DPAPI.
|
- Пароль Jira - шифруется через DPAPI (может быть JSessionID - если длинна = 32 (!)).
|
||||||
- Mercurial Name (Режим Mercurial) - обязателен к указанию для режима Mercurial - имя пользователя Mercurial, от которого проходят коммиты (именно UserName, не E-Mail).
|
- Mercurial Name (Режим Mercurial) - обязателен к указанию для режима Mercurial - имя пользователя Mercurial, от которого проходят коммиты (именно UserName, не E-Mail).
|
||||||
- Округление времени - Для красоты распределения времени тут устанавливается округление. По умолчанию - 15 минут, получим время 1:15, 0:30 итд. Остаток нераспределенного времени будет внесен в самую долгую задачу или же если это невозможно - количество рабочего времени будет увеличено или уменьшено.
|
- Округление времени - Для красоты распределения времени тут устанавливается округление. По умолчанию - 15 минут, получим время 1:15, 0:30 итд. Остаток нераспределенного времени будет внесен в самую долгую задачу или же если это невозможно - количество рабочего времени будет увеличено или уменьшено.
|
||||||
- JQL (Режим Jira) - можно задать свой JQL для поиска задач. Возможные замены: %USER% - Логин Jira, %DATE% дата на которую формируем список. Значнеие по умолчанию: status changed by '%USER%' during ("%DATE%","%DATE%")
|
- JQL (Режим Jira) - можно задать свой JQL для поиска задач. Возможные замены: %USER% - Логин Jira, %DATE% дата на которую формируем список. Значнеие по умолчанию: status changed by '%USER%' during ("%DATE%","%DATE%")
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
|
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-5.1.2.0" newVersion="5.1.2.0" />
|
<bindingRedirect oldVersion="0.0.0.0-6.2.0.0" newVersion="6.2.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
@@ -19,7 +19,19 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
|
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="RestSharp" publicKeyToken="598062e77f915f75" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-106.11.7.0" newVersion="106.11.7.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using RestSharp;
|
||||||
|
using RestSharp.Authenticators;
|
||||||
|
|
||||||
|
namespace JiraTimeBot.JiraIntegration.Authentificators
|
||||||
|
{
|
||||||
|
public class JSessionAuthenticator : AuthenticatorBase
|
||||||
|
{
|
||||||
|
public JSessionAuthenticator(string jSessionId) : base(jSessionId)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override Parameter GetAuthenticationParameter(string token)
|
||||||
|
=> new Parameter("JSESSIONID", token, ParameterType.Cookie);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading;
|
||||||
|
using Atlassian.Jira;
|
||||||
|
using JiraTimeBot.Configuration;
|
||||||
|
using JiraTimeBot.TaskTime.Objects;
|
||||||
|
|
||||||
|
namespace JiraTimeBot.JiraIntegration
|
||||||
|
{
|
||||||
|
public interface IJiraApi
|
||||||
|
{
|
||||||
|
List<Issue> GetIssuesByJQL(string jql, Settings settings, DateTime? date = null, CancellationToken cancellationToken = default);
|
||||||
|
string GetTaskName(string branch, Settings settings);
|
||||||
|
List<Issue> GetWorkloggedIssuesByDate(Settings settings, DateTime? date = null, CancellationToken cancellationToken = default);
|
||||||
|
void SetTodayWorklog(List<TaskTimeItem> taskTimeItems, Settings settings, DateTime? date = null, bool dummy = false, bool addCommentsToWorklog = false, CancellationToken cancellationToken = default);
|
||||||
|
List<Worklog> GetManuallyWorklogged(List<TaskTimeItem> taskTimeItems, Settings settings, DateTime? date, CancellationToken cancellationToken = default);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,18 +6,11 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using JiraTimeBot.JiraIntegration.Authentificators;
|
||||||
|
using RestSharp.Authenticators;
|
||||||
|
|
||||||
namespace JiraTimeBot.JiraIntegration
|
namespace JiraTimeBot.JiraIntegration
|
||||||
{
|
{
|
||||||
public interface IJiraApi
|
|
||||||
{
|
|
||||||
List<Issue> GetIssuesByJQL(string jql, Settings settings, DateTime? date = null, CancellationToken cancellationToken = default);
|
|
||||||
string GetTaskName(string branch, Settings settings);
|
|
||||||
List<Issue> GetWorkloggedIssuesByDate(Settings settings, DateTime? date = null, CancellationToken cancellationToken = default);
|
|
||||||
void SetTodayWorklog(List<TaskTimeItem> taskTimeItems, Settings settings, DateTime? date = null, bool dummy = false, bool addCommentsToWorklog = false, CancellationToken cancellationToken = default);
|
|
||||||
List<Worklog> GetManuallyWorklogged(List<TaskTimeItem> taskTimeItems, Settings settings, DateTime? date, CancellationToken cancellationToken = default);
|
|
||||||
}
|
|
||||||
|
|
||||||
public class JiraApi : IJiraApi
|
public class JiraApi : IJiraApi
|
||||||
{
|
{
|
||||||
private readonly ILog _log;
|
private readonly ILog _log;
|
||||||
@@ -31,9 +24,9 @@ namespace JiraTimeBot.JiraIntegration
|
|||||||
|
|
||||||
public string GetTaskName(string branch, Settings settings)
|
public string GetTaskName(string branch, Settings settings)
|
||||||
{
|
{
|
||||||
var jira = Jira.CreateRestClient(settings.JiraUrl, settings.JiraUserName, settings.JiraPassword);
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
var jira = GetClient(settings);
|
||||||
var issue = jira.Issues.Queryable.FirstOrDefault(f => f.Key == branch);
|
var issue = jira.Issues.Queryable.FirstOrDefault(f => f.Key == branch);
|
||||||
return issue?.Summary;
|
return issue?.Summary;
|
||||||
}
|
}
|
||||||
@@ -45,7 +38,7 @@ namespace JiraTimeBot.JiraIntegration
|
|||||||
|
|
||||||
public List<Issue> GetIssuesByJQL(string jql, Settings settings, DateTime? date = null, CancellationToken cancellationToken = default)
|
public List<Issue> GetIssuesByJQL(string jql, Settings settings, DateTime? date = null, CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
var jira = Jira.CreateRestClient(settings.JiraUrl, settings.JiraUserName, settings.JiraPassword);
|
var jira = GetClient(settings);
|
||||||
date = date.GetValueOrDefault(DateTime.Now.Date);
|
date = date.GetValueOrDefault(DateTime.Now.Date);
|
||||||
|
|
||||||
var userName = settings.JiraUserName;
|
var userName = settings.JiraUserName;
|
||||||
@@ -127,7 +120,7 @@ namespace JiraTimeBot.JiraIntegration
|
|||||||
public void SetTodayWorklog(List<TaskTimeItem> taskTimeItems, Settings settings, DateTime? date = null, bool dummy = false, bool addCommentsToWorklog = false, CancellationToken cancellationToken = default)
|
public void SetTodayWorklog(List<TaskTimeItem> taskTimeItems, Settings settings, DateTime? date = null, bool dummy = false, bool addCommentsToWorklog = false, CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
date = date.GetValueOrDefault(DateTime.Now.Date).Date;
|
date = date.GetValueOrDefault(DateTime.Now.Date).Date;
|
||||||
var jira = Jira.CreateRestClient(settings.JiraUrl, settings.JiraUserName, settings.JiraPassword);
|
var jira = GetClient(settings);
|
||||||
|
|
||||||
if (settings.RemoveManuallyAddedWorklogs)
|
if (settings.RemoveManuallyAddedWorklogs)
|
||||||
{
|
{
|
||||||
@@ -219,5 +212,15 @@ namespace JiraTimeBot.JiraIntegration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Jira GetClient(Settings settings)
|
||||||
|
{
|
||||||
|
var jira = Jira.CreateRestClient(settings.JiraUrl, settings.JiraUserName, settings.JiraPassword);
|
||||||
|
if (settings.JiraPassword.Length == 32)
|
||||||
|
{
|
||||||
|
jira.RestClient.RestSharpClient.Authenticator = new JSessionAuthenticator(settings.JiraPassword);
|
||||||
|
}
|
||||||
|
return jira;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,17 +58,17 @@
|
|||||||
<StartupObject>JiraTimeBot.Program</StartupObject>
|
<StartupObject>JiraTimeBot.Program</StartupObject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Atlassian.Jira, Version=12.1.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Atlassian.Jira, Version=12.4.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Atlassian.SDK.12.1.1\lib\net452\Atlassian.Jira.dll</HintPath>
|
<HintPath>..\packages\Atlassian.SDK.12.4.0\lib\net452\Atlassian.Jira.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Autofac, Version=5.1.2.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
<Reference Include="Autofac, Version=6.2.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Autofac.5.1.2\lib\net461\Autofac.dll</HintPath>
|
<HintPath>..\packages\Autofac.6.2.0\lib\netstandard2.0\Autofac.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Autofac.Extras.AggregateService, Version=5.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
<Reference Include="Autofac.Extras.AggregateService, Version=6.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Autofac.Extras.AggregateService.5.0.0\lib\netstandard2.0\Autofac.Extras.AggregateService.dll</HintPath>
|
<HintPath>..\packages\Autofac.Extras.AggregateService.6.0.0\lib\netstandard2.0\Autofac.Extras.AggregateService.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll</HintPath>
|
<HintPath>..\packages\Castle.Core.4.4.1\lib\net45\Castle.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="LibGit2Sharp, Version=0.26.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333, processorArchitecture=MSIL">
|
<Reference Include="LibGit2Sharp, Version=0.26.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\LibGit2Sharp.0.26.2\lib\net46\LibGit2Sharp.dll</HintPath>
|
<HintPath>..\packages\LibGit2Sharp.0.26.2\lib\net46\LibGit2Sharp.dll</HintPath>
|
||||||
@@ -76,24 +76,37 @@
|
|||||||
<Reference Include="Mercurial.Net, Version=1.1.1.607, Culture=neutral, PublicKeyToken=9e2fabf3af85dba9, processorArchitecture=MSIL">
|
<Reference Include="Mercurial.Net, Version=1.1.1.607, Culture=neutral, PublicKeyToken=9e2fabf3af85dba9, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Mercurial.Net.1.1.1.607\lib\net35-Client\Mercurial.Net.dll</HintPath>
|
<HintPath>..\packages\Mercurial.Net.1.1.1.607\lib\net35-Client\Mercurial.Net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RestSharp, Version=106.0.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
|
<Reference Include="RestSharp, Version=106.11.7.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RestSharp.106.10.1\lib\net452\RestSharp.dll</HintPath>
|
<HintPath>..\packages\RestSharp.106.11.7\lib\net452\RestSharp.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.ComponentModel.Composition" />
|
<Reference Include="System.ComponentModel.Composition" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.7.1\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.DirectoryServices" />
|
<Reference Include="System.DirectoryServices" />
|
||||||
<Reference Include="System.IO.Compression" />
|
<Reference Include="System.IO.Compression" />
|
||||||
<Reference Include="System.IO.Compression.FileSystem" />
|
<Reference Include="System.IO.Compression.FileSystem" />
|
||||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Numerics" />
|
||||||
|
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Runtime.Serialization" />
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<Reference Include="System.Security" />
|
<Reference Include="System.Security" />
|
||||||
@@ -115,8 +128,10 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="DI\ContainerBuilder.cs" />
|
<Compile Include="DI\ContainerBuilder.cs" />
|
||||||
|
<Compile Include="JiraIntegration\Authentificators\JSessionAuthenticator.cs" />
|
||||||
<Compile Include="JiraIntegration\Comments\IJiraDescriptionSource.cs" />
|
<Compile Include="JiraIntegration\Comments\IJiraDescriptionSource.cs" />
|
||||||
<Compile Include="JiraIntegration\Comments\JiraDescriptionSource.cs" />
|
<Compile Include="JiraIntegration\Comments\JiraDescriptionSource.cs" />
|
||||||
|
<Compile Include="JiraIntegration\IJiraApi.cs" />
|
||||||
<Compile Include="JiraIntegration\JiraHistory.cs" />
|
<Compile Include="JiraIntegration\JiraHistory.cs" />
|
||||||
<Compile Include="Job.cs" />
|
<Compile Include="Job.cs" />
|
||||||
<Compile Include="Logger.cs" />
|
<Compile Include="Logger.cs" />
|
||||||
@@ -208,6 +223,7 @@
|
|||||||
<Install>false</Install>
|
<Install>false</Install>
|
||||||
</BootstrapperPackage>
|
</BootstrapperPackage>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -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.89")]
|
[assembly: AssemblyVersion("1.0.94")]
|
||||||
[assembly: AssemblyFileVersion("1.0.89")]
|
[assembly: AssemblyFileVersion("1.0.94")]
|
||||||
[assembly: AssemblyInformationalVersion("1.0.89")]
|
[assembly: AssemblyInformationalVersion("1.0.94")]
|
||||||
|
|||||||
@@ -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));
|
||||||
@@ -184,7 +184,7 @@ namespace JiraTimeBot.RepositoryProviders
|
|||||||
bool directBranchHasBeenFound = false;
|
bool directBranchHasBeenFound = false;
|
||||||
foreach (var branch in repo.Branches)
|
foreach (var branch in repo.Branches)
|
||||||
{
|
{
|
||||||
if (branch.Tip.Sha != commitSha)
|
if (branch.Tip?.Sha != commitSha)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -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())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,15 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Atlassian.SDK" version="12.1.1" targetFramework="net461" />
|
<package id="Atlassian.SDK" version="12.4.0" targetFramework="net461" />
|
||||||
<package id="Autofac" version="5.1.2" targetFramework="net461" />
|
<package id="Autofac" version="6.2.0" targetFramework="net461" />
|
||||||
<package id="Autofac.Extras.AggregateService" version="5.0.0" targetFramework="net461" />
|
<package id="Autofac.Extras.AggregateService" version="6.0.0" targetFramework="net461" />
|
||||||
<package id="Castle.Core" version="4.4.0" targetFramework="net461" />
|
<package id="Castle.Core" version="4.4.1" targetFramework="net461" />
|
||||||
<package id="LibGit2Sharp" version="0.26.2" targetFramework="net461" />
|
<package id="LibGit2Sharp" version="0.26.2" targetFramework="net461" />
|
||||||
<package id="LibGit2Sharp.NativeBinaries" version="2.0.306" targetFramework="net461" />
|
<package id="LibGit2Sharp.NativeBinaries" version="2.0.306" targetFramework="net461" />
|
||||||
<package id="Mercurial.Net" version="1.1.1.607" targetFramework="net461" />
|
<package id="Mercurial.Net" version="1.1.1.607" targetFramework="net461" />
|
||||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="1.1.0" targetFramework="net461" />
|
<package id="Microsoft.Bcl.AsyncInterfaces" version="5.0.0" targetFramework="net461" />
|
||||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net461" />
|
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
|
||||||
<package id="RestSharp" version="106.10.1" targetFramework="net461" />
|
<package id="RestSharp" version="106.11.7" targetFramework="net461" />
|
||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.7.1" targetFramework="net461" />
|
<package id="System.Buffers" version="4.5.1" targetFramework="net461" />
|
||||||
|
<package id="System.Diagnostics.DiagnosticSource" version="4.7.1" targetFramework="net461" />
|
||||||
|
<package id="System.Memory" version="4.5.4" targetFramework="net461" />
|
||||||
|
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
|
||||||
|
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net461" />
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net461" />
|
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
Reference in New Issue
Block a user