Compare commits

...
8 Commits
Author SHA1 Message Date
monster 84da8dad7b Merge pull request #2 from monster1025/dependabot/nuget/src/JiraTimeBot/Newtonsoft.Json-13.0.2
Bump Newtonsoft.Json from 13.0.1 to 13.0.2 in /src/JiraTimeBot
2024-01-07 12:12:40 +03:00
dependabot[bot] 1c7781f443 Bump Newtonsoft.Json from 13.0.1 to 13.0.2 in /src/JiraTimeBot
Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 13.0.1 to 13.0.2.
- [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Commits](https://github.com/JamesNK/Newtonsoft.Json/compare/13.0.1...13.0.2)

---
updated-dependencies:
- dependency-name: Newtonsoft.Json
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-08 14:50:30 +00:00
Danil Kislov fff4d661f7 Обновление версий библиотек 2021-07-16 10:02:22 +03:00
Danil Kislov 34b8d2638e Исправлена регулярочка для веток 2021-07-16 09:57:07 +03:00
monster 9d665f6b30 Префикси проекта - из 5 символов 2021-07-15 11:20:13 +03:00
monster 1210b424e9 Исправление падения git-а 2021-05-26 13:24:20 +03:00
monster 9dc7b18b0b Исправление NRE 2021-05-14 19:02:59 +03:00
monster 14e6f8a317 Update README.md 2021-04-28 17:49:02 +03:00
7 changed files with 56 additions and 45 deletions
+1 -1
View File
@@ -1 +1 @@
1.0.91 1.0.95
+1 -1
View File
@@ -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%")
+5 -1
View File
@@ -23,7 +23,7 @@
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="RestSharp" publicKeyToken="598062e77f915f75" culture="neutral" /> <assemblyIdentity name="RestSharp" publicKeyToken="598062e77f915f75" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-106.11.7.0" newVersion="106.11.7.0" /> <bindingRedirect oldVersion="0.0.0.0-106.12.0.0" newVersion="106.12.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
@@ -33,6 +33,10 @@
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.1" newVersion="5.0.0.1" />
</dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
</configuration> </configuration>
+4 -4
View File
@@ -82,8 +82,8 @@
<Reference Include="Newtonsoft.Json, Version=13.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.13.0.1\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.11.7.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL"> <Reference Include="RestSharp, Version=106.12.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.106.11.7\lib\net452\RestSharp.dll</HintPath> <HintPath>..\packages\RestSharp.106.12.0\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"> <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
@@ -92,8 +92,8 @@
<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"> <Reference Include="System.Diagnostics.DiagnosticSource, Version=5.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.7.1\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath> <HintPath>..\packages\System.Diagnostics.DiagnosticSource.5.0.1\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.DirectoryServices" /> <Reference Include="System.DirectoryServices" />
<Reference Include="System.IO.Compression" /> <Reference Include="System.IO.Compression" />
+31 -31
View File
@@ -1,31 +1,31 @@
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("JiraTimeBot")] [assembly: AssemblyTitle("JiraTimeBot")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("JiraTimeBot")] [assembly: AssemblyProduct("JiraTimeBot")]
[assembly: AssemblyCopyright("Copyright © 2020")] [assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible // 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 // to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type. // COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM // The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f3b89316-c38c-4ce6-9d88-0b1373cfba1a")] [assembly: Guid("f3b89316-c38c-4ce6-9d88-0b1373cfba1a")]
// Version information for an assembly consists of the following four values: // Version information for an assembly consists of the following four values:
// //
// Major Version // Major Version
// Minor Version // Minor Version
// Build Number // Build Number
// Revision // Revision
// //
// 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.91")] [assembly: AssemblyVersion("1.0.95")]
[assembly: AssemblyFileVersion("1.0.91")] [assembly: AssemblyFileVersion("1.0.95")]
[assembly: AssemblyInformationalVersion("1.0.91")] [assembly: AssemblyInformationalVersion("1.0.95")]
+11 -4
View File
@@ -114,11 +114,10 @@ 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));
//.Where(f => f.Contains("-") && !f.Contains("/")).Distinct().FirstOrDefault(); //.Where(f => f.Contains("-") && !f.Contains("/")).Distinct().FirstOrDefault();
if (branch == null) if (branch == null)
@@ -184,7 +183,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 +199,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())
{ {
+3 -3
View File
@@ -8,10 +8,10 @@
<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="5.0.0" targetFramework="net461" /> <package id="Microsoft.Bcl.AsyncInterfaces" version="5.0.0" targetFramework="net461" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" /> <package id="Newtonsoft.Json" version="13.0.2" targetFramework="net461" />
<package id="RestSharp" version="106.11.7" targetFramework="net461" /> <package id="RestSharp" version="106.12.0" targetFramework="net461" />
<package id="System.Buffers" version="4.5.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.Diagnostics.DiagnosticSource" version="5.0.1" targetFramework="net461" />
<package id="System.Memory" version="4.5.4" 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.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net461" /> <package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net461" />