Skip to content

Commit

Permalink
Merge branch 'release/4.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Mar 7, 2024
2 parents fd7dc1f + 6bd54a0 commit 1eed717
Show file tree
Hide file tree
Showing 54 changed files with 632 additions and 267 deletions.
1 change: 1 addition & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ install:
- 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.411 -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 7.0.305 -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 8.0.100 -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
- ps: dotnet --info
- ps: Install-Product node 14
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@ jobs:
runs-on: windows-2022
steps:
- name: Get the sources
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Fetch all tags and branches
run: git fetch --prune --unshallow
- name: Install .NET
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4
with:
# .NET 5 required for GitVersion
dotnet-version: |
5.x
6.x
7.x
8.x
- name: Build
run: .\build.ps1
shell: powershell
- name: Publish NuGet package as build artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4
with:
name: NuGet Package
path: ./BuildArtifacts/Packages/NuGet/
Expand All @@ -33,17 +34,17 @@ jobs:
runs-on: windows-2019
steps:
- name: Get the sources
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install required tools
run: npm install -g markdownlint-cli
shell: powershell
- name: Download build artifact
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3
uses: actions/download-artifact@7a1cd3216ca9260cd8022db641d960b1db4d1be4 # v4
with:
name: NuGet Package
path: ./BuildArtifacts/Packages/NuGet
- name: Install .NET
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4
with:
dotnet-version: |
6.x
Expand All @@ -52,7 +53,7 @@ jobs:
working-directory: ./tests/script-runner/
shell: powershell
- name: Publish generated reports as build artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4
with:
name: Integration Tests Script Runner Windows (.NET Core tool)
path: ./tests/script-runner/BuildArtifacts/output/
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
using Cake.Common.Build;
using Cake.Common.IO;
using Cake.Core.IO;
using Cake.Issues;
using Cake.Issues.PullRequests;
using Cake.Issues.PullRequests.AppVeyor;
using System;

namespace Cake.Frosting.Issues.Recipe
{
using Cake.Common.Build;
using Cake.Common.IO;
using Cake.Core.IO;
using Cake.Issues;
using Cake.Issues.PullRequests;
using Cake.Issues.PullRequests.AppVeyor;
using System;

/// <summary>
/// Support for AppVeyor builds.
/// </summary>
internal class AppVeyorBuildServer : BaseBuildServer
internal sealed class AppVeyorBuildServer : BaseBuildServer
{
/// <inheritdoc />
public override Uri DetermineRepositoryRemoteUrl(
Expand All @@ -20,14 +20,14 @@ public override Uri DetermineRepositoryRemoteUrl(
{
context.NotNull(nameof(context));

switch (context.AppVeyor().Environment.Repository.Provider)
return context.AppVeyor().Environment.Repository.Provider switch
{
case "bitBucket": return new Uri($"https://bitbucket.org/{context.AppVeyor().Environment.Repository.Name}/src");
case "gitHub": return new Uri($"https://github.com/{context.AppVeyor().Environment.Repository.Name}.git");
case "gitLab": return new Uri($"https://gitlab.com/{context.AppVeyor().Environment.Repository.Name}.git");
case "vso": return new Uri($"https://dev.azure.com/{context.AppVeyor().Environment.Repository.Name}");
default: return new Uri(context.AppVeyor().Environment.Repository.Name);
}
"bitBucket" => new Uri($"https://bitbucket.org/{context.AppVeyor().Environment.Repository.Name}/src"),
"gitHub" => new Uri($"https://github.com/{context.AppVeyor().Environment.Repository.Name}.git"),
"gitLab" => new Uri($"https://gitlab.com/{context.AppVeyor().Environment.Repository.Name}.git"),
"vso" => new Uri($"https://dev.azure.com/{context.AppVeyor().Environment.Repository.Name}"),
_ => new Uri(context.AppVeyor().Environment.Repository.Name),
};
}

/// <inheritdoc />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
using Cake.Common;
using Cake.Common.Build;
using Cake.Common.Build.AzurePipelines.Data;
using Cake.Common.IO;
using Cake.Core.IO;
using Cake.Issues;
using Cake.Issues.Reporting;
using Cake.Issues.Reporting.Generic;
using System;
using System.IO;

namespace Cake.Frosting.Issues.Recipe
{
using Cake.Common;
using Cake.Common.Build;
using Cake.Common.Build.AzurePipelines.Data;
using Cake.Common.IO;
using Cake.Core.IO;
using Cake.Issues;
using Cake.Issues.Reporting;
using Cake.Issues.Reporting.Generic;
using System;
using System.IO;

/// <summary>
/// Support for Azure DevOps / Azure Pipelines builds.
/// </summary>
internal class AzureDevOpsBuildServer : BaseBuildServer
internal sealed class AzureDevOpsBuildServer : BaseBuildServer
{
/// <inheritdoc />
public override Uri DetermineRepositoryRemoteUrl(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Cake.Core.IO;
using Cake.Issues;
using System;

namespace Cake.Frosting.Issues.Recipe
{
using Cake.Core.IO;
using Cake.Issues;
using System;

/// <summary>
/// Basic implementation for all build servers.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
using Cake.Common.Build;
using Cake.Core.IO;
using Cake.Issues;
using Cake.Issues.PullRequests;
using Cake.Issues.PullRequests.GitHubActions;
using System;

namespace Cake.Frosting.Issues.Recipe
{
using Cake.Common.Build;
using Cake.Core.IO;
using Cake.Issues;
using Cake.Issues.PullRequests;
using Cake.Issues.PullRequests.GitHubActions;
using System;

/// <summary>
/// Support for builds running on GitHub Actions.
/// </summary>
internal class GitHubActionsBuildServer : BaseBuildServer
internal sealed class GitHubActionsBuildServer : BaseBuildServer
{
/// <inheritdoc />
public override Uri DetermineRepositoryRemoteUrl(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Cake.Core.IO;
using System;

namespace Cake.Frosting.Issues.Recipe
{
using Cake.Core.IO;
using System;

/// <summary>
/// Description of a build server implementation.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Cake.Frosting.Issues.Recipe.xml</DocumentationFile>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
Expand All @@ -24,7 +24,7 @@ For recipe compatible with Cake Script Runners see Cake.Issues.Recipe.</Descript
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/cake-contrib/Cake.Issues.Recipe.git</RepositoryUrl>
<PackageReleaseNotes>https://github.com/cake-contrib/Cake.Issues.Recipe/releases/tag/3.1.1</PackageReleaseNotes>
<PackageReleaseNotes>https://github.com/cake-contrib/Cake.Issues.Recipe/releases/tag/4.0.0</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup>
Expand All @@ -36,21 +36,21 @@ For recipe compatible with Cake Script Runners see Cake.Issues.Recipe.</Descript
</ItemGroup>

<ItemGroup>
<PackageReference Include="Cake.AzureDevOps" Version="3.0.1" />
<PackageReference Include="Cake.Frosting" Version="3.0.0" PrivateAssets="All" />
<PackageReference Include="Cake.Git" Version="3.0.0" />
<PackageReference Include="Cake.Issues" Version="3.0.0" />
<PackageReference Include="Cake.Issues.EsLint" Version="3.0.0" />
<PackageReference Include="Cake.Issues.InspectCode" Version="3.0.0" />
<PackageReference Include="Cake.Issues.Markdownlint" Version="3.0.0" />
<PackageReference Include="Cake.Issues.MsBuild" Version="3.0.0" />
<PackageReference Include="Cake.Issues.PullRequests" Version="3.0.0" />
<PackageReference Include="Cake.Issues.PullRequests.AppVeyor" Version="3.0.0" />
<PackageReference Include="Cake.Issues.PullRequests.AzureDevOps" Version="3.0.0" />
<PackageReference Include="Cake.Issues.PullRequests.GitHubActions" Version="3.0.0" />
<PackageReference Include="Cake.Issues.Reporting" Version="3.0.0" />
<PackageReference Include="Cake.Issues.Reporting.Sarif" Version="3.0.1" />
<PackageReference Include="Cake.Frosting.Issues.Reporting.Generic" Version="3.0.0" />
<PackageReference Include="Cake.AzureDevOps" Version="4.0.0" />
<PackageReference Include="Cake.Frosting" Version="4.0.0" PrivateAssets="All" />
<PackageReference Include="Cake.Frosting.Git" Version="4.0.0" />
<PackageReference Include="Cake.Issues" Version="4.0.0" />
<PackageReference Include="Cake.Issues.EsLint" Version="4.0.0" />
<PackageReference Include="Cake.Issues.InspectCode" Version="4.0.0" />
<PackageReference Include="Cake.Issues.Markdownlint" Version="4.0.0" />
<PackageReference Include="Cake.Frosting.Issues.MsBuild" Version="4.0.0" />
<PackageReference Include="Cake.Issues.PullRequests" Version="4.0.0" />
<PackageReference Include="Cake.Issues.PullRequests.AppVeyor" Version="4.0.0" />
<PackageReference Include="Cake.Issues.PullRequests.AzureDevOps" Version="4.0.0" />
<PackageReference Include="Cake.Issues.PullRequests.GitHubActions" Version="4.0.0" />
<PackageReference Include="Cake.Issues.Reporting" Version="4.0.0" />
<PackageReference Include="Cake.Frosting.Issues.Reporting.Sarif" Version="4.0.0" />
<PackageReference Include="Cake.Frosting.Issues.Reporting.Generic" Version="4.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
using Cake.Core;

namespace Cake.Frosting.Issues.Recipe
namespace Cake.Frosting.Issues.Recipe
{
using Cake.Core;

/// <summary>
/// Parameters and state for the build run.
/// </summary>
public class IssuesContext : IssuesContext<IssuesParameters, IssuesState>
/// <param name="context">The Cake context.</param>
/// <param name="repositoryInfoProviderType">Defines how information about the Git repository should be determined.</param>
public class IssuesContext(
ICakeContext context,
RepositoryInfoProviderType repositoryInfoProviderType) : IssuesContext<IssuesParameters, IssuesState>(context)
{
private readonly RepositoryInfoProviderType repositoryInfoProviderType;

/// <summary>
/// Creates a new instance of the <see cref="IssuesContext"/> class.
/// </summary>
/// <param name="context">The Cake context.</param>
/// <param name="repositoryInfoProviderType">Defines how information about the Git repository should be determined.</param>
public IssuesContext(
ICakeContext context,
RepositoryInfoProviderType repositoryInfoProviderType)
: base(context)
{
this.repositoryInfoProviderType = repositoryInfoProviderType;
}
private readonly RepositoryInfoProviderType repositoryInfoProviderType = repositoryInfoProviderType;

/// <inheritdoc />
protected override IssuesParameters CreateIssuesParameters()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Cake.Core;
using System;

namespace Cake.Frosting.Issues.Recipe
namespace Cake.Frosting.Issues.Recipe
{
using Cake.Core;
using System;

/// <summary>
/// Base class for parameters and state of the build run.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Cake.Core.IO;

namespace Cake.Frosting.Issues.Recipe
namespace Cake.Frosting.Issues.Recipe
{
using Cake.Core.IO;

/// <summary>
/// Description of parameters of the build.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Cake.Core.IO;
using Cake.Issues;
using System.Collections.Generic;

namespace Cake.Frosting.Issues.Recipe
{
using Cake.Core.IO;
using Cake.Issues;
using System.Collections.Generic;

/// <summary>
/// Parameters for passing input files.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Cake.Issues;
using Cake.Issues.PullRequests;
using System.Collections.Generic;

namespace Cake.Frosting.Issues.Recipe
{
using Cake.Issues;
using Cake.Issues.PullRequests;
using System.Collections.Generic;

/// <summary>
/// Parameters for pull request integration.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Cake.Issues.Reporting.Generic;

namespace Cake.Frosting.Issues.Recipe
{
using Cake.Issues.Reporting.Generic;

/// <summary>
/// Parameters for reporting.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using Cake.Core.IO;
using System;

namespace Cake.Frosting.Issues.Recipe
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Cake.Core.IO;
using Cake.Issues;
using System.Collections.Generic;

namespace Cake.Frosting.Issues.Recipe
{
using Cake.Core.IO;
using Cake.Issues;
using System.Collections.Generic;

/// <summary>
/// Parameters for passing input files.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ public class IssuesParametersPullRequestSystem : IIssuesParametersPullRequestSys
public int? MaxIssuesToPostForEachIssueProvider { get; set; } = 100;

/// <inheritdoc />
public Dictionary<string, IProviderIssueLimits> ProviderIssueLimits => new Dictionary<string, IProviderIssueLimits>();
public Dictionary<string, IProviderIssueLimits> ProviderIssueLimits => new();
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Cake.Issues.Reporting.Generic;

namespace Cake.Frosting.Issues.Recipe
{
using Cake.Issues.Reporting.Generic;

/// <summary>
/// Parameters for reporting.
/// </summary>
Expand Down
Loading

0 comments on commit 1eed717

Please sign in to comment.