From 20d2f71646e96c203d9064e0238af8988f99727c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 May 2022 09:28:10 +0200 Subject: [PATCH 01/28] Bump xunit.runner.visualstudio from 2.4.3 to 2.4.4 in /src (#263) Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.4.3 to 2.4.4. - [Release notes](https://github.com/xunit/visualstudio.xunit/releases) - [Commits](https://github.com/xunit/visualstudio.xunit/commits) --- updated-dependencies: - dependency-name: xunit.runner.visualstudio dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Cake.Issues.PullRequests.AzureDevOps.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index de6a97f..cd64807 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -25,7 +25,7 @@ - + From 31f61f1655996108c9d90f56d2a025b6ea833437 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 May 2022 07:12:30 +0200 Subject: [PATCH 02/28] Bump xunit.runner.visualstudio from 2.4.4 to 2.4.5 in /src (#264) Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.4.4 to 2.4.5. - [Release notes](https://github.com/xunit/visualstudio.xunit/releases) - [Commits](https://github.com/xunit/visualstudio.xunit/commits) --- updated-dependencies: - dependency-name: xunit.runner.visualstudio dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Cake.Issues.PullRequests.AzureDevOps.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index cd64807..7a2c184 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -25,7 +25,7 @@ - + From 882836e2b67d252713477398742e0c0c9fd7d0f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 May 2022 08:30:08 +0200 Subject: [PATCH 03/28] Bump Microsoft.NET.Test.Sdk from 17.1.0 to 17.2.0 in /src (#265) Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.1.0 to 17.2.0. - [Release notes](https://github.com/microsoft/vstest/releases) - [Commits](https://github.com/microsoft/vstest/compare/v17.1.0...v17.2.0) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Cake.Issues.PullRequests.AzureDevOps.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index 7a2c184..ab1ef22 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -23,7 +23,7 @@ - + From ad0330317255483210a43803bbd0ef6ffc6e5e4f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 24 Jul 2022 22:53:40 +0200 Subject: [PATCH 04/28] Bump NSubstitute from 4.3.0 to 4.4.0 in /src (#266) Bumps NSubstitute from 4.3.0 to 4.4.0. --- updated-dependencies: - dependency-name: NSubstitute dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Cake.Issues.PullRequests.AzureDevOps.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index ab1ef22..f2181dc 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -20,7 +20,7 @@ - + From 93d05f118ad32d4d6b667e15e9222f2714306f90 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Aug 2022 12:36:41 +0200 Subject: [PATCH 05/28] Bump xunit from 2.4.1 to 2.4.2 in /src (#267) Bumps [xunit](https://github.com/xunit/xunit) from 2.4.1 to 2.4.2. - [Release notes](https://github.com/xunit/xunit/releases) - [Commits](https://github.com/xunit/xunit/compare/2.4.1...2.4.2) --- updated-dependencies: - dependency-name: xunit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Cake.Issues.PullRequests.AzureDevOps.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index f2181dc..20e4abe 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -24,7 +24,7 @@ - + From e707db6912314fb323823f41c3eb6f9a179ceb6c Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Mon, 8 Aug 2022 20:36:04 +0000 Subject: [PATCH 06/28] Update to Cake.Recipe 3.0 (#268) --- .config/dotnet-tools.json | 2 +- recipe.cake | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 727dfd7..4903ba5 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "cake.tool": { - "version": "0.38.5", + "version": "1.3.0", "commands": [ "dotnet-cake" ] diff --git a/recipe.cake b/recipe.cake index 14f7c43..9f144dd 100644 --- a/recipe.cake +++ b/recipe.cake @@ -1,4 +1,8 @@ -#load nuget:?package=Cake.Recipe&version=2.2.1 +#load nuget:?package=Cake.Recipe&version=3.0.0 + +//************************************************************************************************* +// Settings +//************************************************************************************************* Environment.SetVariableNames(); @@ -12,7 +16,6 @@ BuildParameters.SetParameters( appVeyorAccountName: "cakecontrib", shouldGenerateDocumentation: false, shouldCalculateVersion: true, - shouldRunDupFinder: false, // dupFinder is missing in 2021.3.0-eap shouldRunCodecov: false, shouldRunDotNetCorePack: true); @@ -20,17 +23,12 @@ BuildParameters.PrintParameters(Context); ToolSettings.SetToolSettings( context: Context, - dupFinderExcludePattern: new string[] { BuildParameters.RootDirectoryPath + "/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/*.cs" }, testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[Cake.Common]* -[Cake.Testing]* -[*.Tests]* -[Cake.Issues]* -[Cake.Issues.Testing]* -[Cake.Issues.PullRequests]* -[Cake.AzureDevOps]* -[Shouldly]* -[DiffEngine]* -[EmptyFiles]*", testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*", testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs"); -// Workaround until https://github.com/cake-contrib/Cake.Recipe/issues/862 has been fixed in Cake.Recipe -ToolSettings.SetToolPreprocessorDirectives( - reSharperTools: "#tool nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2021.3.1", - gitVersionGlobalTool: "#tool dotnet:?package=GitVersion.Tool&version=5.8.1"); - -// Disable Upload-Coveralls-Report task since it fails to install the tool on AppVeyor -BuildParameters.Tasks.UploadCoverallsReportTask.WithCriteria(() => false); +//************************************************************************************************* +// Execution +//************************************************************************************************* Build.RunDotNetCore(); From 2597a6f3659848a063c63887993981782c5361ff Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Tue, 9 Aug 2022 18:57:50 +0000 Subject: [PATCH 07/28] Disable coveralls (#269) --- recipe.cake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipe.cake b/recipe.cake index 9f144dd..04c718f 100644 --- a/recipe.cake +++ b/recipe.cake @@ -14,9 +14,8 @@ BuildParameters.SetParameters( repositoryOwner: "cake-contrib", repositoryName: "Cake.Issues.PullRequests.AzureDevOps", appVeyorAccountName: "cakecontrib", + shouldRunCoveralls: false, // Disabled because it's currently failing shouldGenerateDocumentation: false, - shouldCalculateVersion: true, - shouldRunCodecov: false, shouldRunDotNetCorePack: true); BuildParameters.PrintParameters(Context); From 2687fcf41d299cfcbd0e7dd5ff121bc85f82fbfb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Aug 2022 08:31:58 +0200 Subject: [PATCH 08/28] Bump Microsoft.NET.Test.Sdk from 17.2.0 to 17.3.0 in /src (#270) Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.2.0 to 17.3.0. - [Release notes](https://github.com/microsoft/vstest/releases) - [Commits](https://github.com/microsoft/vstest/compare/v17.2.0...v17.3.0) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Cake.Issues.PullRequests.AzureDevOps.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index 20e4abe..c589606 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -23,7 +23,7 @@ - + From 5e923e54868a580cc04230836a337531a267041f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Aug 2022 07:52:24 +0200 Subject: [PATCH 09/28] Bump Shouldly from 4.0.3 to 4.1.0 in /src (#271) Bumps [Shouldly](https://github.com/shouldly/shouldly) from 4.0.3 to 4.1.0. - [Release notes](https://github.com/shouldly/shouldly/releases) - [Changelog](https://github.com/shouldly/shouldly/blob/master/BREAKING%20CHANGES.txt) - [Commits](https://github.com/shouldly/shouldly/compare/v4.0.3...4.1.0) --- updated-dependencies: - dependency-name: Shouldly dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Cake.Issues.PullRequests.AzureDevOps.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index c589606..0bfa081 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -21,7 +21,7 @@ - + From b93e96c957003fffa3467286d0e44b2c26df2d98 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Aug 2022 08:06:33 +0200 Subject: [PATCH 10/28] Bump Microsoft.NET.Test.Sdk from 17.3.0 to 17.3.1 in /src (#272) Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.3.0 to 17.3.1. - [Release notes](https://github.com/microsoft/vstest/releases) - [Commits](https://github.com/microsoft/vstest/compare/v17.3.0...v17.3.1) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Cake.Issues.PullRequests.AzureDevOps.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index 0bfa081..6bd66e6 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -23,7 +23,7 @@ - + From 1b9daa72100173d55c97926b9e938bafaeda67d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Sep 2022 09:48:35 +0200 Subject: [PATCH 11/28] Bump Cake.AzureDevOps from 2.0.0-beta0001 to 2.0.0 in /src (#273) Bumps [Cake.AzureDevOps](https://github.com/cake-contrib/Cake.AzureDevOps) from 2.0.0-beta0001 to 2.0.0. - [Release notes](https://github.com/cake-contrib/Cake.AzureDevOps/releases) - [Changelog](https://github.com/cake-contrib/Cake.AzureDevOps/blob/develop/GitReleaseManager.yaml) - [Commits](https://github.com/cake-contrib/Cake.AzureDevOps/commits/2.0.0) --- updated-dependencies: - dependency-name: Cake.AzureDevOps dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Cake.Issues.PullRequests.AzureDevOps.Tests.csproj | 2 +- .../Cake.Issues.PullRequests.AzureDevOps.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index 6bd66e6..54eca67 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj b/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj index 69d48d8..c672708 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj @@ -44,7 +44,7 @@ See the Project Site for an overview of the whole ecosystem of addins for workin - + all runtime; build; native; contentfiles; analyzers; buildtransitive From d24ea43072cd415d1defb8b9f84c4ac2863b42d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Sep 2022 09:56:25 +0200 Subject: [PATCH 12/28] Bump Microsoft.NET.Test.Sdk from 17.3.1 to 17.3.2 in /src (#274) Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.3.1 to 17.3.2. - [Release notes](https://github.com/microsoft/vstest/releases) - [Commits](https://github.com/microsoft/vstest/compare/v17.3.1...v17.3.2) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Cake.Issues.PullRequests.AzureDevOps.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index 54eca67..eeb3350 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -23,7 +23,7 @@ - + From 1ef6bb658ea30c4c6cd556a67af1e2ecbdf01999 Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Fri, 14 Oct 2022 11:58:58 +0000 Subject: [PATCH 13/28] Ignore Cake.AzureDevOps updates until 3.0 (#276) --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2fdc831..6519f92 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,7 +15,7 @@ updates: - "(,3.0)" - dependency-name: Cake.AzureDevOps versions: - - "> 1.0.0, < 2" + - "(,3.0)" - dependency-name: Cake.Issues versions: - "> 1.0.0, < 2" From 7c38ce7b3405edff9ad828acdad73bea90794520 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Dec 2022 23:04:59 +0100 Subject: [PATCH 14/28] Bump Microsoft.NET.Test.Sdk from 17.3.2 to 17.4.0 in /src (#277) Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.3.2 to 17.4.0. - [Release notes](https://github.com/microsoft/vstest/releases) - [Commits](https://github.com/microsoft/vstest/compare/v17.3.2...v17.4.0) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Cake.Issues.PullRequests.AzureDevOps.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index c8238c8..c8bffff 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -23,7 +23,7 @@ - + From 4f0a1df756b8272a617eed0b32308fd026474a2e Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Sat, 11 Feb 2023 10:08:34 +0000 Subject: [PATCH 15/28] Update target frameworks (#288) --- azure-pipelines.yml | 24 ++++++++++++++----- global.json | 2 +- ...sues.PullRequests.AzureDevOps.Tests.csproj | 2 +- ...ake.Issues.PullRequests.AzureDevOps.csproj | 2 +- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3735be4..253fbad 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,6 +14,16 @@ jobs: pool: vmImage: 'windows-2022' steps: + # .NET 5 required for GitVersion + - task: UseDotNet@2 + inputs: + version: '5.x' + - task: UseDotNet@2 + inputs: + version: '6.x' + - task: UseDotNet@2 + inputs: + version: '7.x' - powershell: | $ENV:CAKE_SKIP_GITVERSION=([string]::IsNullOrEmpty($ENV:SYSTEM_PULLREQUEST_PULLREQUESTID) -eq $False).ToString() .\build.ps1 @@ -24,15 +34,16 @@ jobs: pool: vmImage: 'macOS-10.15' steps: + # .NET 5 required for GitVersion - task: UseDotNet@2 inputs: - version: '6.x' + version: '5.x' - task: UseDotNet@2 inputs: - version: '5.x' + version: '6.x' - task: UseDotNet@2 inputs: - version: '3.x' + version: '7.x' - bash: | ./build.sh displayName: 'Cake Build' @@ -41,15 +52,16 @@ jobs: pool: vmImage: 'ubuntu-18.04' steps: + # .NET 5 required for GitVersion - task: UseDotNet@2 inputs: - version: '6.x' + version: '5.x' - task: UseDotNet@2 inputs: - version: '5.x' + version: '6.x' - task: UseDotNet@2 inputs: - version: '3.x' + version: '7.x' - bash: | ./build.sh --verbosity=diagnostic displayName: 'Cake Build' \ No newline at end of file diff --git a/global.json b/global.json index c31f98b..e981252 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,7 @@ { "sdk": { "allowPrerelease": true, - "version": "6.0.100", + "version": "7.0.100", "rollForward": "latestFeature" } } \ No newline at end of file diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index c8bffff..3adab2d 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1;net5.0;net6.0 + net6.0;net7.0 false Cake.Issues.PullRequests.AzureDevOps Copyright © BBT Software AG and contributors diff --git a/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj b/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj index 5554c4e..ef6f443 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1;net5.0;net6.0 + net6.0;net7.0 bin\$(Configuration)\$(TargetFramework)\Cake.Issues.PullRequests.AzureDevOps.xml From 34f8e425d1d85f83258e6abcd011715f4a145425 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Feb 2023 10:15:38 +0000 Subject: [PATCH 16/28] Bump Microsoft.NET.Test.Sdk from 17.4.0 to 17.4.1 in /src (#284) Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.4.0 to 17.4.1. - [Release notes](https://github.com/microsoft/vstest/releases) - [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md) - [Commits](https://github.com/microsoft/vstest/compare/v17.4.0...v17.4.1) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Cake.Issues.PullRequests.AzureDevOps.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index 3adab2d..bbd3e24 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -23,7 +23,7 @@ - + From 3566c040f32ee2410b085e7dffc8c817943aad06 Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Sat, 11 Feb 2023 10:22:19 +0000 Subject: [PATCH 17/28] Update for Cake 3.0 (#289) * Bump Cake.Core from 2.0.0 to 3.0.0 in /src Bumps [Cake.Core](https://github.com/cake-build/cake) from 2.0.0 to 3.0.0. - [Release notes](https://github.com/cake-build/cake/releases) - [Changelog](https://github.com/cake-build/cake/blob/develop/ReleaseNotes.md) - [Commits](https://github.com/cake-build/cake/compare/v2.0.0...v3.0.0) --- updated-dependencies: - dependency-name: Cake.Core dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Bump Cake.Testing from 2.0.0 to 3.0.0 in /src Bumps [Cake.Testing](https://github.com/cake-build/cake) from 2.0.0 to 3.0.0. - [Release notes](https://github.com/cake-build/cake/releases) - [Changelog](https://github.com/cake-build/cake/blob/develop/ReleaseNotes.md) - [Commits](https://github.com/cake-build/cake/compare/v2.0.0...v3.0.0) --- updated-dependencies: - dependency-name: Cake.Testing dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Cake.Issues.PullRequests.AzureDevOps.Tests.csproj | 2 +- .../Cake.Issues.PullRequests.AzureDevOps.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index bbd3e24..0323026 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -18,7 +18,7 @@ - + diff --git a/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj b/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj index ef6f443..d401d6d 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj @@ -41,7 +41,7 @@ See the Project Site for an overview of the whole ecosystem of addins for workin - + From 4fe9ff5de8ec1c4ceb22cd6cec73cabee8a896d8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Feb 2023 10:32:01 +0000 Subject: [PATCH 18/28] Bump Microsoft.CodeAnalysis.NetAnalyzers from 6.0.0 to 7.0.0 in /src (#283) Bumps [Microsoft.CodeAnalysis.NetAnalyzers](https://github.com/dotnet/roslyn-analyzers) from 6.0.0 to 7.0.0. - [Release notes](https://github.com/dotnet/roslyn-analyzers/releases) - [Changelog](https://github.com/dotnet/roslyn-analyzers/blob/main/PostReleaseActivities.md) - [Commits](https://github.com/dotnet/roslyn-analyzers/compare/6.0.0...7.0.0) --- updated-dependencies: - dependency-name: Microsoft.CodeAnalysis.NetAnalyzers dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Cake.Issues.PullRequests.AzureDevOps.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj b/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj index d401d6d..a74740e 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj @@ -45,7 +45,7 @@ See the Project Site for an overview of the whole ecosystem of addins for workin - + all runtime; build; native; contentfiles; analyzers; buildtransitive From e1fc06eade9abd670588a878b28e50afd87473f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Feb 2023 12:00:12 +0100 Subject: [PATCH 19/28] Bump Cake.AzureDevOps from 2.0.0 to 3.0.0 in /src (#290) * Bump Cake.AzureDevOps from 2.0.0 to 3.0.0 in /src Bumps [Cake.AzureDevOps](https://github.com/cake-contrib/Cake.AzureDevOps) from 2.0.0 to 3.0.0. - [Release notes](https://github.com/cake-contrib/Cake.AzureDevOps/releases) - [Changelog](https://github.com/cake-contrib/Cake.AzureDevOps/blob/develop/GitReleaseManager.yaml) - [Commits](https://github.com/cake-contrib/Cake.AzureDevOps/compare/2.0.0...3.0.0) --- updated-dependencies: - dependency-name: Cake.AzureDevOps dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Update Code for Cake.AzureDevOps 3.0 --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Pascal Berger --- ...sues.PullRequests.AzureDevOps.Tests.csproj | 2 +- .../AzureDevOpsPullRequestSystem.cs | 75 +++++++++---------- ...ake.Issues.PullRequests.AzureDevOps.csproj | 2 +- 3 files changed, 37 insertions(+), 42 deletions(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index 0323026..bd19195 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -19,7 +19,7 @@ - + diff --git a/src/Cake.Issues.PullRequests.AzureDevOps/AzureDevOpsPullRequestSystem.cs b/src/Cake.Issues.PullRequests.AzureDevOps/AzureDevOpsPullRequestSystem.cs index 7add89c..b5588d4 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps/AzureDevOpsPullRequestSystem.cs +++ b/src/Cake.Issues.PullRequests.AzureDevOps/AzureDevOpsPullRequestSystem.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; + using System.Threading; using Cake.AzureDevOps.Repos.PullRequest; using Cake.AzureDevOps.Repos.PullRequest.CommentThread; using Cake.Core.Diagnostics; @@ -168,16 +169,23 @@ private IEnumerable CreateDiscussionThreads // ReSharper disable once PossibleMultipleEnumeration foreach (var issue in issues) { + var changeTrackingId = + this.TryGetCodeFlowChangeTrackingId(changes, issue.AffectedFileRelativePath); + if (changeTrackingId < 0) + { + // Don't post comment if we couldn't determine the change. + this.Log.Information( + "Skipping discussion comment for the issue at line {0} from {1} since change tracking ID could not be determined", + issue.Line, + issue.AffectedFileRelativePath); + continue; + } + this.Log.Information( "Creating a discussion comment for the issue at line {0} from {1}", issue.Line, issue.AffectedFileRelativePath); - var newThread = new AzureDevOpsPullRequestCommentThread() - { - Status = AzureDevOpsCommentThreadStatus.Active, - }; - var discussionComment = new AzureDevOpsComment { CommentType = AzureDevOpsCommentType.System, @@ -185,27 +193,37 @@ private IEnumerable CreateDiscussionThreads Content = ContentProvider.GetContent(issue), }; - if (!this.AddThreadProperties(newThread, changes, issue, iterationId, commentSource)) + var newThread = new AzureDevOpsPullRequestCommentThread() { - continue; - } + Status = AzureDevOpsCommentThreadStatus.Active, + Comments = new List { discussionComment }, + Properties = this.GetThreadProperties(changeTrackingId, issue, iterationId), + }; + + // Add a custom property to be able to distinguish all comments created this way. + newThread.SetCommentSource(commentSource); + + // Add custom property for identifying the comment for subsequent runs + newThread.SetCommentIdentifier(issue.Identifier); + + // Add a custom property to be able to distinguish all comments by provider type later on + newThread.SetProviderType(issue.ProviderType); + + // Add a custom property to be able to return issue message from existing threads, + // without any formatting done by this addin, back to Cake.Issues.PullRequests. + newThread.SetIssueMessage(issue.MessageText); - newThread.Comments = new List { discussionComment }; result.Add(newThread); } return result; } - private bool AddThreadProperties( - AzureDevOpsPullRequestCommentThread thread, - IEnumerable changes, + private Dictionary GetThreadProperties( + int changeTrackingId, IIssue issue, - int iterationId, - string commentSource) + int iterationId) { - thread.NotNull(nameof(thread)); - changes.NotNull(nameof(changes)); issue.NotNull(nameof(issue)); var properties = new Dictionary(); @@ -214,14 +232,6 @@ private bool AddThreadProperties( { if (this.azureDevOpsPullRequest.CodeReviewId > 0) { - var changeTrackingId = - this.TryGetCodeFlowChangeTrackingId(changes, issue.AffectedFileRelativePath); - if (changeTrackingId < 0) - { - // Don't post comment if we couldn't determine the change. - return false; - } - AddCodeFlowProperties(issue, iterationId, changeTrackingId, properties); } else @@ -233,22 +243,7 @@ private bool AddThreadProperties( // An Azure DevOps UI extension will recognize this and format the comments differently. properties.Add("CodeAnalysisThreadType", "CodeAnalysisIssue"); - thread.Properties = properties; - - // Add a custom property to be able to distinguish all comments created this way. - thread.SetCommentSource(commentSource); - - // Add custom property for identifying the comment for subsequent runs - thread.SetCommentIdentifier(issue.Identifier); - - // Add a custom property to be able to distinguish all comments by provider type later on - thread.SetProviderType(issue.ProviderType); - - // Add a custom property to be able to return issue message from existing threads, - // without any formatting done by this addin, back to Cake.Issues.PullRequests. - thread.SetIssueMessage(issue.MessageText); - - return true; + return properties; } private int GetCodeFlowLatestIterationId() diff --git a/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj b/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj index a74740e..3456007 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj @@ -44,7 +44,7 @@ See the Project Site for an overview of the whole ecosystem of addins for workin - + all runtime; build; native; contentfiles; analyzers; buildtransitive From f63ee061b9fd62b7f60dcbb068adf388e960de39 Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Sat, 11 Feb 2023 11:07:49 +0000 Subject: [PATCH 20/28] Update Dependabot config (#292) --- .github/dependabot.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6519f92..0421cff 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,20 +8,14 @@ updates: open-pull-requests-limit: 10 ignore: - dependency-name: Cake.Core - versions: - - "(,3.0)" + update-types: ["version-update:semver-minor"] - dependency-name: Cake.Testing - versions: - - "(,3.0)" + update-types: ["version-update:semver-minor"] - dependency-name: Cake.AzureDevOps - versions: - - "(,3.0)" + update-types: ["version-update:semver-minor"] - dependency-name: Cake.Issues - versions: - - "> 1.0.0, < 2" + update-types: ["version-update:semver-minor"] - dependency-name: Cake.Issues.Testing - versions: - - "> 1.0.0, < 2" + update-types: ["version-update:semver-minor"] - dependency-name: Cake.Issues.PullRequests - versions: - - "> 1.0.0, < 2" \ No newline at end of file + update-types: ["version-update:semver-minor"] \ No newline at end of file From 3ba84e8dfd8ef385fed288ce06306d2344766a18 Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Sat, 11 Feb 2023 11:32:26 +0000 Subject: [PATCH 21/28] Update to Cake.Issues 3.0 Beta 1 (#293) --- .../Cake.Issues.PullRequests.AzureDevOps.Tests.csproj | 6 +++--- .../Cake.Issues.PullRequests.AzureDevOps.csproj | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index bd19195..362f4f1 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -15,9 +15,9 @@ - - - + + + diff --git a/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj b/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj index 3456007..0ccd5ef 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj @@ -42,8 +42,8 @@ See the Project Site for an overview of the whole ecosystem of addins for workin - - + + all From b54f5c72f16dff4f60bce7e13a7fada704ceceff Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Sat, 11 Feb 2023 20:21:22 +0000 Subject: [PATCH 22/28] Build on macOS 11 (#295) --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 253fbad..4076111 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -32,7 +32,7 @@ jobs: - job: macOS pool: - vmImage: 'macOS-10.15' + vmImage: 'macOS-11' steps: # .NET 5 required for GitVersion - task: UseDotNet@2 From 20694b42d12017bf8144831aa940249b9cfd1b03 Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Sat, 11 Feb 2023 20:21:43 +0000 Subject: [PATCH 23/28] Build on Ubuntu 20 (#296) --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4076111..e373d58 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -50,7 +50,7 @@ jobs: - job: Ubuntu pool: - vmImage: 'ubuntu-18.04' + vmImage: 'ubuntu-20.04' steps: # .NET 5 required for GitVersion - task: UseDotNet@2 From e9900d87357bce14d71773217e5aa3c830f68020 Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Sat, 11 Feb 2023 20:33:23 +0000 Subject: [PATCH 24/28] Fix linting issues (#294) --- ...ureDevOpsPullRequestSystemSettingsTests.cs | 1 + .../AzureDevOpsPullRequestSystemTests.cs | 5 +- ...reDevOpsCheckingCommitIdCapabilityTests.cs | 5 +- ...eDevOpsDiscussionThreadsCapabilityTests.cs | 5 +- ...FilteringByModifiedFilesCapabilityTests.cs | 5 +- .../Capabilities/CommentExtensionsTests.cs | 5 +- .../CommentThreadStatusExtensionsTests.cs | 1 + ...PullRequestCommentThreadExtensionsTests.cs | 91 ++++++++++--------- .../ContentProviderTests.cs | 1 + ...s.PullRequests.AzureDevOps.sln.DotSettings | 18 ++-- .../AzureDevOpsPullRequestSystem.cs | 81 +++++++++-------- .../AzureDevOpsPullRequestSystemSettings.cs | 5 +- 12 files changed, 125 insertions(+), 98 deletions(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/AzureDevOpsPullRequestSystemSettingsTests.cs b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/AzureDevOpsPullRequestSystemSettingsTests.cs index 02956b9..b5733e0 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/AzureDevOpsPullRequestSystemSettingsTests.cs +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/AzureDevOpsPullRequestSystemSettingsTests.cs @@ -5,6 +5,7 @@ using Cake.Issues.Testing; using Xunit; + // ReSharper disable once ClassNeverInstantiated.Global public sealed class AzureDevOpsPullRequestSystemSettingsTests { public sealed class TheCtor diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/AzureDevOpsPullRequestSystemTests.cs b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/AzureDevOpsPullRequestSystemTests.cs index 9e68d3a..73bea30 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/AzureDevOpsPullRequestSystemTests.cs +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/AzureDevOpsPullRequestSystemTests.cs @@ -7,6 +7,7 @@ using Cake.Testing; using Xunit; + // ReSharper disable once ClassNeverInstantiated.Global public sealed class AzureDevOpsPullRequestSystemTests { public sealed class TheCtor @@ -15,7 +16,7 @@ public sealed class TheCtor public void Should_Throw_If_Log_Is_Null() { // Given - ICakeLog log = null; + const ICakeLog log = null; var settings = new AzureDevOpsPullRequestSystemSettings( new Uri("https://google.com"), @@ -34,7 +35,7 @@ public void Should_Throw_If_Settings_Are_Null() { // Given var log = new FakeLog(); - AzureDevOpsPullRequestSystemSettings settings = null; + const AzureDevOpsPullRequestSystemSettings settings = null; // When var result = Record.Exception(() => new AzureDevOpsPullRequestSystem(log, settings)); diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/AzureDevOpsCheckingCommitIdCapabilityTests.cs b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/AzureDevOpsCheckingCommitIdCapabilityTests.cs index f433063..900eb8a 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/AzureDevOpsCheckingCommitIdCapabilityTests.cs +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/AzureDevOpsCheckingCommitIdCapabilityTests.cs @@ -7,6 +7,7 @@ using NSubstitute; using Xunit; + // ReSharper disable once ClassNeverInstantiated.Global public sealed class AzureDevOpsCheckingCommitIdCapabilityTests { public sealed class TheCtor @@ -15,7 +16,7 @@ public sealed class TheCtor public void Should_Throw_If_Log_Is_Null() { // Given - ICakeLog log = null; + const ICakeLog log = null; var pullRequestSystem = Substitute.For(); // When @@ -30,7 +31,7 @@ public void Should_Throw_If_PullRequestSystem_Is_Null() { // Given var log = new FakeLog(); - AzureDevOpsPullRequestSystem pullRequestSystem = null; + const AzureDevOpsPullRequestSystem pullRequestSystem = null; // When var result = Record.Exception(() => new AzureDevOpsCheckingCommitIdCapability(log, pullRequestSystem)); diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/AzureDevOpsDiscussionThreadsCapabilityTests.cs b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/AzureDevOpsDiscussionThreadsCapabilityTests.cs index 2a04fd4..6991f3b 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/AzureDevOpsDiscussionThreadsCapabilityTests.cs +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/AzureDevOpsDiscussionThreadsCapabilityTests.cs @@ -7,6 +7,7 @@ using NSubstitute; using Xunit; + // ReSharper disable once ClassNeverInstantiated.Global public sealed class AzureDevOpsDiscussionThreadsCapabilityTests { public sealed class TheCtor @@ -15,7 +16,7 @@ public sealed class TheCtor public void Should_Throw_If_Log_Is_Null() { // Given - ICakeLog log = null; + const ICakeLog log = null; var pullRequestSystem = Substitute.For(); // When @@ -30,7 +31,7 @@ public void Should_Throw_If_PullRequestSystem_Is_Null() { // Given var log = new FakeLog(); - AzureDevOpsPullRequestSystem pullRequestSystem = null; + const AzureDevOpsPullRequestSystem pullRequestSystem = null; // When var result = Record.Exception(() => new AzureDevOpsDiscussionThreadsCapability(log, pullRequestSystem)); diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/AzureDevOpsFilteringByModifiedFilesCapabilityTests.cs b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/AzureDevOpsFilteringByModifiedFilesCapabilityTests.cs index f6172e6..a709525 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/AzureDevOpsFilteringByModifiedFilesCapabilityTests.cs +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/AzureDevOpsFilteringByModifiedFilesCapabilityTests.cs @@ -7,6 +7,7 @@ using NSubstitute; using Xunit; + // ReSharper disable once ClassNeverInstantiated.Global public sealed class AzureDevOpsFilteringByModifiedFilesCapabilityTests { public sealed class TheCtor @@ -15,7 +16,7 @@ public sealed class TheCtor public void Should_Throw_If_Log_Is_Null() { // Given - ICakeLog log = null; + const ICakeLog log = null; var pullRequestSystem = Substitute.For(); // When @@ -30,7 +31,7 @@ public void Should_Throw_If_PullRequestSystem_Is_Null() { // Given var log = new FakeLog(); - AzureDevOpsPullRequestSystem pullRequestSystem = null; + const AzureDevOpsPullRequestSystem pullRequestSystem = null; // When var result = Record.Exception(() => new AzureDevOpsFilteringByModifiedFilesCapability(log, pullRequestSystem)); diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/CommentExtensionsTests.cs b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/CommentExtensionsTests.cs index 8dec569..18ad15c 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/CommentExtensionsTests.cs +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/CommentExtensionsTests.cs @@ -6,6 +6,7 @@ using Shouldly; using Xunit; + // ReSharper disable once ClassNeverInstantiated.Global public sealed class CommentExtensionsTests { public sealed class TheToPullRequestDiscussionCommentExtension @@ -14,7 +15,7 @@ public sealed class TheToPullRequestDiscussionCommentExtension public void Should_Throw_If_Comment_Is_Null() { // Given - AzureDevOpsComment comment = null; + const AzureDevOpsComment comment = null; // When var result = Record.Exception(() => comment.ToPullRequestDiscussionComment()); @@ -27,7 +28,7 @@ public void Should_Throw_If_Comment_Is_Null() public void Should_Set_Correct_Content() { // Given - var content = "foo"; + const string content = "foo"; var comment = new AzureDevOpsComment { diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/CommentThreadStatusExtensionsTests.cs b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/CommentThreadStatusExtensionsTests.cs index 40ab28e..16bb576 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/CommentThreadStatusExtensionsTests.cs +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/CommentThreadStatusExtensionsTests.cs @@ -5,6 +5,7 @@ using Shouldly; using Xunit; + // ReSharper disable once ClassNeverInstantiated.Global public sealed class CommentThreadStatusExtensionsTests { public sealed class TheToPullRequestDiscussionStatusExtension diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/GitPullRequestCommentThreadExtensionsTests.cs b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/GitPullRequestCommentThreadExtensionsTests.cs index 1fac687..e90013a 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/GitPullRequestCommentThreadExtensionsTests.cs +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Capabilities/GitPullRequestCommentThreadExtensionsTests.cs @@ -8,6 +8,7 @@ using Shouldly; using Xunit; + // ReSharper disable once ClassNeverInstantiated.Global public sealed class GitPullRequestCommentThreadExtensionsTests { public sealed class TheToPullRequestDiscussionThreadExtension @@ -16,7 +17,7 @@ public sealed class TheToPullRequestDiscussionThreadExtension public void Should_Throw_If_Thread_Is_Null() { // Given - AzureDevOpsPullRequestCommentThread thread = null; + const AzureDevOpsPullRequestCommentThread thread = null; // When var result = Record.Exception(() => thread.ToPullRequestDiscussionThread()); @@ -71,9 +72,9 @@ public void Should_Not_Throw_If_Properties_Are_Null() public void Should_Set_Correct_Id() { // Given - var id = 123; - var status = AzureDevOpsCommentThreadStatus.Active; - var filePath = "/foo.cs"; + const int id = 123; + const AzureDevOpsCommentThreadStatus status = AzureDevOpsCommentThreadStatus.Active; + const string filePath = "/foo.cs"; var thread = new AzureDevOpsPullRequestCommentThread { @@ -118,8 +119,8 @@ public void Should_Set_Correct_Status( PullRequestDiscussionStatus expectedResult) { // Given - var id = 123; - var filePath = "/foo.cs"; + const int id = 123; + const string filePath = "/foo.cs"; var thread = new AzureDevOpsPullRequestCommentThread { @@ -142,8 +143,8 @@ public void Should_Set_Correct_Status( public void Should_Set_Correct_FilePath(string filePath, string expectedResult) { // Given - var id = 123; - var status = AzureDevOpsCommentThreadStatus.Active; + const int id = 123; + const AzureDevOpsCommentThreadStatus status = AzureDevOpsCommentThreadStatus.Active; var thread = new AzureDevOpsPullRequestCommentThread { @@ -185,11 +186,11 @@ public void Should_Set_Correct_FilePath_If_ThreadContext_Is_Null() public void Should_Set_Correct_Comments() { // Given - var id = 123; - var status = AzureDevOpsCommentThreadStatus.Active; - var filePath = "/foo.cs"; - var commentContent = "foo"; - var commentIsDeleted = false; + const int id = 123; + const AzureDevOpsCommentThreadStatus status = AzureDevOpsCommentThreadStatus.Active; + const string filePath = "/foo.cs"; + const string commentContent = "foo"; + const bool commentIsDeleted = false; var thread = new AzureDevOpsPullRequestCommentThread { @@ -198,7 +199,7 @@ public void Should_Set_Correct_Comments() FilePath = filePath, Comments = new List { - new AzureDevOpsComment() + new () { Content = commentContent, IsDeleted = commentIsDeleted, @@ -220,10 +221,10 @@ public void Should_Set_Correct_Comments() public void Should_Set_Correct_CommentSource() { // Given - var id = 123; - var status = AzureDevOpsCommentThreadStatus.Active; - var filePath = "/foo.cs"; - var commentSource = "foo"; + const int id = 123; + const AzureDevOpsCommentThreadStatus status = AzureDevOpsCommentThreadStatus.Active; + const string filePath = "/foo.cs"; + const string commentSource = "foo"; var thread = new AzureDevOpsPullRequestCommentThread { @@ -246,10 +247,10 @@ public void Should_Set_Correct_CommentSource() public void Should_Set_Correct_ProviderType() { // Given - var id = 123; - var status = AzureDevOpsCommentThreadStatus.Active; - var filePath = "/foo.cs"; - var providerType = "foo"; + const int id = 123; + const AzureDevOpsCommentThreadStatus status = AzureDevOpsCommentThreadStatus.Active; + const string filePath = "/foo.cs"; + const string providerType = "foo"; var thread = new AzureDevOpsPullRequestCommentThread { @@ -295,8 +296,8 @@ public void Should_Set_Correct_Resolution( PullRequestDiscussionResolution expectedResult) { // Given - var id = 123; - var filePath = "/foo.cs"; + const int id = 123; + const string filePath = "/foo.cs"; var thread = new AzureDevOpsPullRequestCommentThread { @@ -321,7 +322,7 @@ public sealed class TheGetCommentSourceExtension public void Should_Throw_If_Thread_Is_Null() { // Given - AzureDevOpsPullRequestCommentThread thread = null; + const AzureDevOpsPullRequestCommentThread thread = null; // When var result = Record.Exception(() => thread.GetCommentSource()); @@ -355,7 +356,7 @@ public void Should_Not_Throw_If_Properties_Are_Null() public void Should_Return_Comment_Source() { // Given - var commentSource = "foo"; + const string commentSource = "foo"; var thread = new AzureDevOpsPullRequestCommentThread { @@ -381,7 +382,7 @@ public sealed class TheGetProviderTypeExtension public void Should_Throw_If_Thread_Is_Null() { // Given - AzureDevOpsPullRequestCommentThread thread = null; + const AzureDevOpsPullRequestCommentThread thread = null; // When var result = Record.Exception(() => thread.GetProviderType()); @@ -415,7 +416,7 @@ public void Should_Not_Throw_If_Properties_Are_Null() public void Should_Return_ProviderType() { // Given - var providerType = "fooProv"; + const string providerType = "fooProv"; var thread = new AzureDevOpsPullRequestCommentThread { @@ -441,8 +442,8 @@ public sealed class TheSetCommentSourceExtension public void Should_Throw_If_Thread_Is_Null() { // Given - AzureDevOpsPullRequestCommentThread thread = null; - var value = "foo"; + const AzureDevOpsPullRequestCommentThread thread = null; + const string value = "foo"; // When var result = Record.Exception(() => thread.SetCommentSource(value)); @@ -464,7 +465,7 @@ public void Should_Throw_If_Properties_Are_Null() Comments = new List(), Properties = null, }; - var value = "foo"; + const string value = "foo"; // When var result = Record.Exception(() => thread.SetCommentSource(value)); @@ -477,7 +478,7 @@ public void Should_Throw_If_Properties_Are_Null() public void Should_Set_Comment_Source() { // Given - var commentSource = "foo"; + const string commentSource = "foo"; var thread = new AzureDevOpsPullRequestCommentThread { @@ -502,8 +503,8 @@ public sealed class TheSetProviderTypeExtension public void Should_Throw_If_Thread_Is_Null() { // Given - AzureDevOpsPullRequestCommentThread thread = null; - var value = "foo"; + const AzureDevOpsPullRequestCommentThread thread = null; + const string value = "foo"; // When var result = Record.Exception(() => thread.SetProviderType(value)); @@ -538,7 +539,7 @@ public void Should_Throw_If_Properties_Are_Null() public void Should_Set_ProviderType() { // Given - var providerType = "provType"; + const string providerType = "provType"; var thread = new AzureDevOpsPullRequestCommentThread { @@ -563,8 +564,8 @@ public sealed class TheIsCommentSourceExtension public void Should_Throw_If_Thread_Is_Null() { // Given - AzureDevOpsPullRequestCommentThread thread = null; - var value = "foo"; + const AzureDevOpsPullRequestCommentThread thread = null; + const string value = "foo"; // When var result = Record.Exception(() => thread.IsCommentSource(value)); @@ -586,7 +587,7 @@ public void Should_Not_Throw_If_Properties_Are_Null() Comments = new List(), Properties = null, }; - var value = "foo"; + const string value = "foo"; // When var result = thread.IsCommentSource(value); @@ -599,7 +600,7 @@ public void Should_Not_Throw_If_Properties_Are_Null() public void Should_Return_True_For_Existing_Comment_Source() { // Given - var commentSource = "foo"; + const string commentSource = "foo"; var thread = new AzureDevOpsPullRequestCommentThread { @@ -647,7 +648,7 @@ public sealed class TheGetIssueMessageExtension public void Should_Throw_If_Thread_Is_Null() { // Given - AzureDevOpsPullRequestCommentThread thread = null; + const AzureDevOpsPullRequestCommentThread thread = null; // When var result = Record.Exception(() => thread.GetIssueMessage()); @@ -681,7 +682,7 @@ public void Should_Not_Throw_If_Properties_Are_Null() public void Should_Return_Message() { // Given - var message = "foo"; + const string message = "foo"; var thread = new AzureDevOpsPullRequestCommentThread { @@ -707,8 +708,8 @@ public sealed class TheSetIssueMessageExtension public void Should_Throw_If_Thread_Is_Null() { // Given - AzureDevOpsPullRequestCommentThread thread = null; - var value = "foo"; + const AzureDevOpsPullRequestCommentThread thread = null; + const string value = "foo"; // When var result = Record.Exception(() => thread.SetIssueMessage(value)); @@ -730,7 +731,7 @@ public void Should_Throw_If_Properties_Are_Null() Comments = new List(), Properties = null, }; - var value = "foo"; + const string value = "foo"; // When var result = Record.Exception(() => thread.SetIssueMessage(value)); @@ -743,7 +744,7 @@ public void Should_Throw_If_Properties_Are_Null() public void Should_Return_Message() { // Given - var message = "foo"; + const string message = "foo"; var thread = new AzureDevOpsPullRequestCommentThread { diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/ContentProviderTests.cs b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/ContentProviderTests.cs index d727869..2c0be3f 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/ContentProviderTests.cs +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/ContentProviderTests.cs @@ -4,6 +4,7 @@ using Shouldly; using Xunit; + // ReSharper disable once ClassNeverInstantiated.Global public sealed class ContentProviderTests { public sealed class TheGetContentMethod diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.sln.DotSettings b/src/Cake.Issues.PullRequests.AzureDevOps.sln.DotSettings index 4158618..1e74221 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.sln.DotSettings +++ b/src/Cake.Issues.PullRequests.AzureDevOps.sln.DotSettings @@ -1,8 +1,14 @@  DO_NOT_SHOW - <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> - Field, Property - True - True - True - \ No newline at end of file + DO_NOT_SHOW + DO_NOT_SHOW + DO_NOT_SHOW + DO_NOT_SHOW + DO_NOT_SHOW + DO_NOT_SHOW + + DO_NOT_SHOW + DO_NOT_SHOW + Field, Property, Event, Method + + <Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /> \ No newline at end of file diff --git a/src/Cake.Issues.PullRequests.AzureDevOps/AzureDevOpsPullRequestSystem.cs b/src/Cake.Issues.PullRequests.AzureDevOps/AzureDevOpsPullRequestSystem.cs index b5588d4..5b5a8f7 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps/AzureDevOpsPullRequestSystem.cs +++ b/src/Cake.Issues.PullRequests.AzureDevOps/AzureDevOpsPullRequestSystem.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; - using System.Threading; using Cake.AzureDevOps.Repos.PullRequest; using Cake.AzureDevOps.Repos.PullRequest.CommentThread; using Cake.Core.Diagnostics; @@ -147,25 +146,27 @@ private IEnumerable CreateDiscussionThreads // ReSharper disable once PossibleMultipleEnumeration issues.NotNull(nameof(issues)); + if (this.azureDevOpsPullRequest.CodeReviewId <= 0) + { + this.Log.Error("Skipping creation of discussion thread since code review ID is not set."); + return new List(); + } + this.Log.Verbose("Creating new discussion threads"); - var result = new List(); // Code flow properties - var iterationId = 0; - IEnumerable changes = null; - - if (this.azureDevOpsPullRequest.CodeReviewId > 0) - { - iterationId = this.GetCodeFlowLatestIterationId(); - changes = this.GetCodeFlowChanges(iterationId); - } + var iterationId = this.GetCodeFlowLatestIterationId(); + var changes = this.GetCodeFlowChanges(iterationId).ToList(); // Filter issues not related to a file. if (!this.settings.ReportIssuesNotRelatedToAFile) { + // ReSharper disable once PossibleMultipleEnumeration issues = issues.Where(x => x.AffectedFileRelativePath != null); } + var result = new List(); + // ReSharper disable once PossibleMultipleEnumeration foreach (var issue in issues) { @@ -255,45 +256,53 @@ private int GetCodeFlowLatestIterationId() private IEnumerable GetCodeFlowChanges(int iterationId) { - var changes = this.azureDevOpsPullRequest.GetIterationChanges(iterationId); + var changes = + this.azureDevOpsPullRequest.GetIterationChanges(iterationId); - if (changes != null) + if (changes == null) { - this.Log.Verbose("Change count: {0}", changes.Count()); + this.Log.Warning("Changes for iteration {0} could not be detected", iterationId); + return new List(); } - return changes; + var result = changes.ToList(); + this.Log.Verbose("Change count: {0}", result.Count); + + return result; } private int TryGetCodeFlowChangeTrackingId(IEnumerable changes, FilePath path) { + // ReSharper disable once PossibleMultipleEnumeration changes.NotNull(nameof(changes)); path.NotNull(nameof(path)); - var change = changes.Where(x => x.ItemPath != null && x.ItemPath.FullPath == "/" + path.ToString()).ToList(); - - if (change.Count == 0) - { - this.Log.Error( - "Cannot post a comment for the file {0} because no changes on the pull request server could be found.", - path); - return -1; - } + // ReSharper disable once PossibleMultipleEnumeration + var change = + changes + .Where(x => x.ItemPath != null && x.ItemPath.FullPath == "/" + path) + .ToList(); - if (change.Count > 1) + switch (change.Count) { - this.Log.Error( - "Cannot post a comment for the file {0} because more than one change has been found on the pull request server:" + Environment.NewLine + "{1}", - path, - string.Join( - Environment.NewLine, - change.Select( - x => string.Format( - CultureInfo.InvariantCulture, - " ID: {0}, Path: {1}", - x.ChangeId, - x.ItemPath)))); - return -1; + case 0: + this.Log.Error( + "Cannot post a comment for the file {0} because no changes on the pull request server could be found.", + path); + return -1; + case > 1: + this.Log.Error( + "Cannot post a comment for the file {0} because more than one change has been found on the pull request server:" + Environment.NewLine + "{1}", + path, + string.Join( + Environment.NewLine, + change.Select( + x => string.Format( + CultureInfo.InvariantCulture, + " ID: {0}, Path: {1}", + x.ChangeId, + x.ItemPath)))); + return -1; } var changeTrackingId = change.Single().ChangeTrackingId; diff --git a/src/Cake.Issues.PullRequests.AzureDevOps/AzureDevOpsPullRequestSystemSettings.cs b/src/Cake.Issues.PullRequests.AzureDevOps/AzureDevOpsPullRequestSystemSettings.cs index 54983ac..31e5420 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps/AzureDevOpsPullRequestSystemSettings.cs +++ b/src/Cake.Issues.PullRequests.AzureDevOps/AzureDevOpsPullRequestSystemSettings.cs @@ -71,6 +71,7 @@ public AzureDevOpsPullRequestSystemSettings() /// is still up to date before posting comments. /// Default value is true. /// + // ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global public bool CheckCommitId { get; set; } = true; /// @@ -78,6 +79,7 @@ public AzureDevOpsPullRequestSystemSettings() /// resolved oder reopened. /// Default value is true. /// + // ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global public bool ManageDiscussionThreadStatus { get; set; } = true; /// @@ -85,6 +87,7 @@ public AzureDevOpsPullRequestSystemSettings() /// as comments or not. /// Default value is false. /// - public bool ReportIssuesNotRelatedToAFile { get; set; } = false; + // ReSharper disable once UnusedAutoPropertyAccessor.Global + public bool ReportIssuesNotRelatedToAFile { get; set; } } } From d69016c77b7534f64ea10c44cc824746e243719b Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Sat, 11 Feb 2023 20:43:45 +0000 Subject: [PATCH 25/28] Break build if any issues are found (#297) --- recipe.cake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/recipe.cake b/recipe.cake index 04c718f..224c42d 100644 --- a/recipe.cake +++ b/recipe.cake @@ -26,6 +26,23 @@ ToolSettings.SetToolSettings( testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*", testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs"); +//************************************************************************************************* +// Custom tasks +//************************************************************************************************* + +Task("BreakBuildOnIssues") + .Description("Breaks build if any issues in the code are found.") + .Does((data) => +{ + if (data.Issues.Any()) + { + throw new Exception("Issues found in code."); + } +}); + +IssuesBuildTasks.IssuesTask + .IsDependentOn("BreakBuildOnIssues"); + //************************************************************************************************* // Execution //************************************************************************************************* From e37aba3408fe30a54d6ee251e4730aa5e8de678b Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Sat, 11 Feb 2023 20:47:53 +0000 Subject: [PATCH 26/28] Install .NET 7 on AppVeyor build (#298) --- .appveyor.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index bd9dc86..f7f80b0 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -10,10 +10,9 @@ install: - ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetsdk" - ps: mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null - ps: Invoke-WebRequest -Uri "https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1" -OutFile "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" - - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 2.1.818 -InstallDir $env:DOTNET_INSTALL_DIR' - - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 3.1.414 -InstallDir $env:DOTNET_INSTALL_DIR' - - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 5.0.402 -InstallDir $env:DOTNET_INSTALL_DIR' - - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 6.0.100 -InstallDir $env:DOTNET_INSTALL_DIR' + - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 5.0.408 -InstallDir $env:DOTNET_INSTALL_DIR' + - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 6.0.405 -InstallDir $env:DOTNET_INSTALL_DIR' + - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 7.0.102 -InstallDir $env:DOTNET_INSTALL_DIR' - ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path" - ps: dotnet --info From 2b6a4cc41074469c8c94994ec9e11a2208fe1d59 Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Sat, 11 Feb 2023 22:18:27 +0100 Subject: [PATCH 27/28] Update release notes link --- .../Cake.Issues.PullRequests.AzureDevOps.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj b/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj index 0ccd5ef..f241e5a 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj @@ -32,7 +32,7 @@ See the Project Site for an overview of the whole ecosystem of addins for workin MIT git https://github.com/cake-contrib/Cake.Issues.PullRequests.AzureDevOps.git - https://github.com/cake-contrib/Cake.Issues.PullRequests.AzureDevOps/releases/tag/2.0.0 + https://github.com/cake-contrib/Cake.Issues.PullRequests.AzureDevOps/releases/tag/3.0.0 From 702694aae1d04e53a906598295dab781bd068ff4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 13 Jul 2023 12:49:31 +0000 Subject: [PATCH 28/28] Update Cake.Issues to v3.0.0 --- .../Cake.Issues.PullRequests.AzureDevOps.Tests.csproj | 6 +++--- .../Cake.Issues.PullRequests.AzureDevOps.csproj | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj index 362f4f1..1dfc99e 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps.Tests/Cake.Issues.PullRequests.AzureDevOps.Tests.csproj @@ -15,9 +15,9 @@ - - - + + + diff --git a/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj b/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj index f241e5a..9f6ec75 100644 --- a/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj +++ b/src/Cake.Issues.PullRequests.AzureDevOps/Cake.Issues.PullRequests.AzureDevOps.csproj @@ -42,8 +42,8 @@ See the Project Site for an overview of the whole ecosystem of addins for workin - - + + all