diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/BuildServers/AppVeyorBuildServer.cs b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/BuildServers/AppVeyorBuildServer.cs
index 23fa1089..e4d7407d 100644
--- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/BuildServers/AppVeyorBuildServer.cs
+++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/BuildServers/AppVeyorBuildServer.cs
@@ -65,7 +65,7 @@ public override void ReportIssuesToBuildServer(
context.ReportIssuesToPullRequest(
context.State.Issues,
context.AppVeyorBuilds(),
- context.State.BuildRootDirectory);
+ context.State.ProjectRootDirectory);
}
///
diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/BuildServers/AzureDevOpsBuildServer.cs b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/BuildServers/AzureDevOpsBuildServer.cs
index 66dc5396..0f43d33d 100644
--- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/BuildServers/AzureDevOpsBuildServer.cs
+++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/BuildServers/AzureDevOpsBuildServer.cs
@@ -107,7 +107,7 @@ public override void CreateSummaryIssuesReport(
context.CreateIssueReport(
context.State.Issues,
context.GenericIssueReportFormatFromContent(sr.ReadToEnd()),
- context.State.BuildRootDirectory,
+ context.State.ProjectRootDirectory,
summaryFilePath);
}
}
diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/BuildServers/GitHubActionsBuildServer.cs b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/BuildServers/GitHubActionsBuildServer.cs
index c2da770f..eee6c912 100644
--- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/BuildServers/GitHubActionsBuildServer.cs
+++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/BuildServers/GitHubActionsBuildServer.cs
@@ -58,7 +58,7 @@ public override void ReportIssuesToBuildServer(
context.ReportIssuesToPullRequest(
context.State.Issues,
context.GitHubActionsBuilds(),
- context.State.BuildRootDirectory);
+ context.State.ProjectRootDirectory);
}
///
diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.csproj b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.csproj
index eb6e8384..00d1df6f 100644
--- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.csproj
+++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.csproj
@@ -24,7 +24,7 @@ For recipe compatible with Cake Script Runners see Cake.Issues.Recipe.MIT
git
https://github.com/cake-contrib/Cake.Issues.Recipe.git
- https://github.com/cake-contrib/Cake.Issues.Recipe/releases/tag/1.1.0
+ https://github.com/cake-contrib/Cake.Issues.Recipe/releases/tag/1.2.0
diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/Parameters/IssuesParametersPullRequestSystem.cs b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/Parameters/IssuesParametersPullRequestSystem.cs
index 1e45edd7..d7dd4f85 100644
--- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/Parameters/IssuesParametersPullRequestSystem.cs
+++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/Parameters/IssuesParametersPullRequestSystem.cs
@@ -1,3 +1,7 @@
+using Cake.Issues;
+using Cake.Issues.PullRequests;
+using System.Collections.Generic;
+
namespace Cake.Frosting.Issues.Recipe
{
///
@@ -11,6 +15,44 @@ public class IssuesParametersPullRequestSystem
///
public bool ShouldReportIssuesToPullRequest { get; set; } = true;
+ ///
+ /// Gets or sets the global number of issues which should be posted at maximum over all
+ /// .
+ /// Issues are filtered by and issues with an
+ /// are prioritized.
+ /// Default is null which won't set a global limit.
+ /// Use to set a limit across multiple runs.
+ ///
+ public int? MaxIssuesToPost { get; set; }
+
+ ///
+ /// Gets or sets the global number of issues which should be posted at maximum over all
+ /// and across multiple runs.
+ /// Issues are filtered by and issues with an
+ /// are prioritized.
+ /// Default is null which won't set a limit across multiple runs.
+ /// Use to set a limit for a single run.
+ ///
+ public int? MaxIssuesToPostAcrossRuns { get; set; }
+
+ ///
+ /// Gets or sets the number of issues which should be posted at maximum for each
+ /// .
+ /// Issues are filtered by and issues with an
+ /// are prioritized.
+ /// null won't limit issues per issue provider.
+ /// Default is to filter to 100 issues for each issue provider.
+ /// Use to set limits for individual issue providers.
+ ///
+ public int? MaxIssuesToPostForEachIssueProvider { get; set; } = 100;
+
+ ///
+ /// Gets the issue limits for individual .
+ /// The key must be the of a specific provider to which the limits should be applied to.
+ /// Use to set the same limit to all issue providers.
+ ///
+ public Dictionary ProviderIssueLimits { get; } = new Dictionary();
+
///
/// Gets or sets a value indicating whether a status on the pull request should be set.
/// Default value is true.
diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/State/IssuesState.cs b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/State/IssuesState.cs
index 7fcfaec3..ae97e2fd 100644
--- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/State/IssuesState.cs
+++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/State/IssuesState.cs
@@ -26,6 +26,12 @@ public class IssuesState
///
public DirectoryPath BuildRootDirectory { get; }
+ ///
+ /// Gets the root directory of the project.
+ /// Default value is the parent directory of the .
+ ///
+ public DirectoryPath ProjectRootDirectory { get; set; }
+
///
/// Gets the remote URL of the repository.
///
@@ -85,6 +91,9 @@ public IssuesState(
this.BuildRootDirectory = context.MakeAbsolute(context.Directory("./"));
context.Information("Build script root directory: {0}", this.BuildRootDirectory);
+ this.ProjectRootDirectory = this.BuildRootDirectory.Combine("..").Collapse();
+ context.Information("Project root directory: {0}", this.ProjectRootDirectory);
+
this.RepositoryInfo = DetermineRepositoryInfoProvider(context, repositoryInfoProviderType);
this.RepositoryRootDirectory = this.RepositoryInfo.GetRepositoryRootDirectory(context, this.BuildRootDirectory);
diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/CreateFullIssuesReportTask.cs b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/CreateFullIssuesReportTask.cs
index 24e642a7..02e7ba88 100644
--- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/CreateFullIssuesReportTask.cs
+++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/CreateFullIssuesReportTask.cs
@@ -40,7 +40,7 @@ public override void Run(IssuesContext context)
context.CreateIssueReport(
context.State.Issues,
context.GenericIssueReportFormat(context.Parameters.Reporting.FullIssuesReportSettings),
- context.State.BuildRootDirectory,
+ context.State.ProjectRootDirectory,
context.State.FullIssuesReport);
}
}
diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/PullRequestSystems/AzureDevOpsPullRequestSystem.cs b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/PullRequestSystems/AzureDevOpsPullRequestSystem.cs
index 452d5f0e..fd41b895 100644
--- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/PullRequestSystems/AzureDevOpsPullRequestSystem.cs
+++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/PullRequestSystems/AzureDevOpsPullRequestSystem.cs
@@ -34,7 +34,7 @@ public override void ReportIssuesToPullRequest(IssuesContext context)
context.State.BuildServer.DetermineRepositoryRemoteUrl(context, context.State.RepositoryRootDirectory),
context.State.BuildServer.DeterminePullRequestId(context).Value,
context.AzureDevOpsAuthenticationOAuth(context.EnvironmentVariable("SYSTEM_ACCESSTOKEN"))),
- context.State.BuildRootDirectory);
+ GetReportIssuesToPullRequestSettings(context));
#endregion
}
@@ -87,7 +87,7 @@ public override FileLinkSettings GetFileLinkSettings(IssuesContext context)
{
context.NotNull(nameof(context));
- var rootPath = context.State.RepositoryRootDirectory.GetRelativePath(context.State.BuildRootDirectory);
+ var rootPath = context.State.RepositoryRootDirectory.GetRelativePath(context.State.ProjectRootDirectory);
return context.IssueFileLinkSettingsForAzureDevOpsCommit(
context.State.RepositoryRemoteUrl,
diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/PullRequestSystems/BasePullRequestSystem.cs b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/PullRequestSystems/BasePullRequestSystem.cs
index d8fa0358..8cb02d5a 100644
--- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/PullRequestSystems/BasePullRequestSystem.cs
+++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/PullRequestSystems/BasePullRequestSystem.cs
@@ -1,4 +1,5 @@
using Cake.Issues;
+using Cake.Issues.PullRequests;
namespace Cake.Frosting.Issues.Recipe
{
@@ -18,5 +19,28 @@ public abstract void SetPullRequestIssuesState(
///
public abstract FileLinkSettings GetFileLinkSettings(
IssuesContext context);
+
+ ///
+ /// Returns settings for reporting issues to pull requests.
+ ///
+ /// The Cake context.
+ /// Settings for reporting issues to pull requests.
+ protected static IReportIssuesToPullRequestSettings GetReportIssuesToPullRequestSettings(IssuesContext context)
+ {
+ var settings =
+ new ReportIssuesToPullRequestSettings(context.State.ProjectRootDirectory)
+ {
+ MaxIssuesToPost = context.Parameters.PullRequestSystem.MaxIssuesToPost,
+ MaxIssuesToPostAcrossRuns = context.Parameters.PullRequestSystem.MaxIssuesToPostAcrossRuns,
+ MaxIssuesToPostForEachIssueProvider = context.Parameters.PullRequestSystem.MaxIssuesToPostForEachIssueProvider
+ };
+
+ foreach (var providerIssueLimit in context.Parameters.PullRequestSystem.ProviderIssueLimits)
+ {
+ settings.ProviderIssueLimits.Add(providerIssueLimit.Key, providerIssueLimit.Value);
+ }
+
+ return settings;
+ }
}
}
\ No newline at end of file
diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/PullRequestSystems/GitHubPullRequestSystem.cs b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/PullRequestSystems/GitHubPullRequestSystem.cs
index 560ff21b..ab037681 100644
--- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/PullRequestSystems/GitHubPullRequestSystem.cs
+++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/PullRequestSystems/GitHubPullRequestSystem.cs
@@ -28,7 +28,7 @@ public override FileLinkSettings GetFileLinkSettings(IssuesContext context)
{
context.NotNull(nameof(context));
- var rootPath = context.State.RepositoryRootDirectory.GetRelativePath(context.State.BuildRootDirectory);
+ var rootPath = context.State.RepositoryRootDirectory.GetRelativePath(context.State.ProjectRootDirectory);
return context.IssueFileLinkSettingsForGitHubCommit(
context.State.RepositoryRemoteUrl,
diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/ReadIssuesTask.cs b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/ReadIssuesTask.cs
index af470b63..3a386c0b 100644
--- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/ReadIssuesTask.cs
+++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/ReadIssuesTask.cs
@@ -21,7 +21,7 @@ public override void Run(IssuesContext context)
context.NotNull(nameof(context));
// Define default settings.
- var defaultSettings = new ReadIssuesSettings(context.State.BuildRootDirectory);
+ var defaultSettings = new ReadIssuesSettings(context.State.ProjectRootDirectory);
if (context.State.PullRequestSystem != null)
{
diff --git a/Cake.Issues.Recipe/Content/build.cake b/Cake.Issues.Recipe/Content/build.cake
index 96278fd3..ded368da 100644
--- a/Cake.Issues.Recipe/Content/build.cake
+++ b/Cake.Issues.Recipe/Content/build.cake
@@ -45,7 +45,7 @@ IssuesBuildTasks.ReadIssuesTask = Task("Read-Issues")
.Does((data) =>
{
// Define default settings.
- var defaultSettings = new ReadIssuesSettings(data.BuildRootDirectory);
+ var defaultSettings = new ReadIssuesSettings(data.ProjectRootDirectory);
if (data.PullRequestSystem != null)
{
@@ -150,7 +150,7 @@ IssuesBuildTasks.CreateFullIssuesReportTask = Task("Create-FullIssuesReport")
CreateIssueReport(
data.Issues,
GenericIssueReportFormat(IssuesParameters.Reporting.FullIssuesReportSettings),
- data.BuildRootDirectory,
+ data.ProjectRootDirectory,
data.FullIssuesReport);
});
diff --git a/Cake.Issues.Recipe/Content/data/IssuesData.cake b/Cake.Issues.Recipe/Content/data/IssuesData.cake
index 8aab5934..5582c681 100644
--- a/Cake.Issues.Recipe/Content/data/IssuesData.cake
+++ b/Cake.Issues.Recipe/Content/data/IssuesData.cake
@@ -15,6 +15,12 @@ public class IssuesData
///
public DirectoryPath BuildRootDirectory { get; }
+ ///
+ /// Gets the root directory of the project.
+ /// Default value is the .
+ ///
+ public DirectoryPath ProjectRootDirectory { get; set; }
+
/// Gets the remote URL of the repository.
///
public Uri RepositoryRemoteUrl { get; }
@@ -74,6 +80,9 @@ public class IssuesData
this.BuildRootDirectory = context.MakeAbsolute(context.Directory("./"));
context.Information("Build script root directory: {0}", this.BuildRootDirectory);
+ this.ProjectRootDirectory = this.BuildRootDirectory;
+ context.Information("Project root directory: {0}", this.ProjectRootDirectory);
+
this.RepositoryInfo = DetermineRepositoryInfoProvider(context, repositoryInfoProviderType);
this.RepositoryRootDirectory = context.GitFindRootFromPath(this.BuildRootDirectory);
diff --git a/Cake.Issues.Recipe/Content/parameters/IssuesParametersPullRequestSystem.cake b/Cake.Issues.Recipe/Content/parameters/IssuesParametersPullRequestSystem.cake
index 8b63a7d3..bc294c3a 100644
--- a/Cake.Issues.Recipe/Content/parameters/IssuesParametersPullRequestSystem.cake
+++ b/Cake.Issues.Recipe/Content/parameters/IssuesParametersPullRequestSystem.cake
@@ -9,6 +9,44 @@ public class IssuesParametersPullRequestSystem
///
public bool ShouldReportIssuesToPullRequest { get; set; } = true;
+ ///
+ /// Gets or sets the global number of issues which should be posted at maximum over all
+ /// .
+ /// Issues are filtered by and issues with an
+ /// are prioritized.
+ /// Default is null which won't set a global limit.
+ /// Use to set a limit across multiple runs.
+ ///
+ public int? MaxIssuesToPost { get; set; }
+
+ ///
+ /// Gets or sets the global number of issues which should be posted at maximum over all
+ /// and across multiple runs.
+ /// Issues are filtered by and issues with an
+ /// are prioritized.
+ /// Default is null which won't set a limit across multiple runs.
+ /// Use to set a limit for a single run.
+ ///
+ public int? MaxIssuesToPostAcrossRuns { get; set; }
+
+ ///
+ /// Gets or sets the number of issues which should be posted at maximum for each
+ /// .
+ /// Issues are filtered by and issues with an
+ /// are prioritized.
+ /// null won't limit issues per issue provider.
+ /// Default is to filter to 100 issues for each issue provider.
+ /// Use to set limits for individual issue providers.
+ ///
+ public int? MaxIssuesToPostForEachIssueProvider { get; set; } = 100;
+
+ ///
+ /// Gets the issue limits for individual .
+ /// The key must be the of a specific provider to which the limits should be applied to.
+ /// Use to set the same limit to all issue providers.
+ ///
+ public Dictionary ProviderIssueLimits { get; } = new Dictionary();
+
///
/// Gets or sets a value indicating whether a status on the pull request should be set.
/// Default value is true.
diff --git a/Cake.Issues.Recipe/Content/tasks/buildservers/AppVeyorBuildServer.cake b/Cake.Issues.Recipe/Content/tasks/buildservers/AppVeyorBuildServer.cake
index 3a585a80..964dc7b9 100644
--- a/Cake.Issues.Recipe/Content/tasks/buildservers/AppVeyorBuildServer.cake
+++ b/Cake.Issues.Recipe/Content/tasks/buildservers/AppVeyorBuildServer.cake
@@ -57,7 +57,7 @@ public class AppVeyorBuildServer : BaseBuildServer
context.ReportIssuesToPullRequest(
data.Issues,
context.AppVeyorBuilds(),
- data.BuildRootDirectory);
+ data.ProjectRootDirectory);
}
///
diff --git a/Cake.Issues.Recipe/Content/tasks/buildservers/AzureDevOpsBuildServer.cake b/Cake.Issues.Recipe/Content/tasks/buildservers/AzureDevOpsBuildServer.cake
index 4db69d8d..9aa7bbe0 100644
--- a/Cake.Issues.Recipe/Content/tasks/buildservers/AzureDevOpsBuildServer.cake
+++ b/Cake.Issues.Recipe/Content/tasks/buildservers/AzureDevOpsBuildServer.cake
@@ -89,7 +89,7 @@ public class AzureDevOpsBuildServer : BaseBuildServer
data.Issues,
context.GenericIssueReportFormatFromFilePath(
new FilePath(sourceFilePath).GetDirectory().Combine("tasks").Combine("buildservers").CombineWithFilePath("AzurePipelineSummary.cshtml")),
- data.BuildRootDirectory,
+ data.ProjectRootDirectory,
summaryFilePath);
context.AzurePipelines().Commands.UploadTaskSummary(summaryFilePath);
diff --git a/Cake.Issues.Recipe/Content/tasks/buildservers/GitHubActionsBuildServer.cake b/Cake.Issues.Recipe/Content/tasks/buildservers/GitHubActionsBuildServer.cake
index 2275bf80..ac587b5a 100644
--- a/Cake.Issues.Recipe/Content/tasks/buildservers/GitHubActionsBuildServer.cake
+++ b/Cake.Issues.Recipe/Content/tasks/buildservers/GitHubActionsBuildServer.cake
@@ -51,7 +51,7 @@ public class GitHubActionsBuildServer : BaseBuildServer
context.ReportIssuesToPullRequest(
data.Issues,
context.GitHubActionsBuilds(),
- data.BuildRootDirectory);
+ data.ProjectRootDirectory);
}
///
diff --git a/Cake.Issues.Recipe/Content/tasks/pullrequestsystems/AzureDevOpsPullRequestSystem.cake b/Cake.Issues.Recipe/Content/tasks/pullrequestsystems/AzureDevOpsPullRequestSystem.cake
index d9a3fc56..7530ec43 100644
--- a/Cake.Issues.Recipe/Content/tasks/pullrequestsystems/AzureDevOpsPullRequestSystem.cake
+++ b/Cake.Issues.Recipe/Content/tasks/pullrequestsystems/AzureDevOpsPullRequestSystem.cake
@@ -21,7 +21,7 @@ public class AzureDevOpsPullRequestSystem : BasePullRequestSystem
data.BuildServer.DetermineRepositoryRemoteUrl(context, data.RepositoryRootDirectory),
data.BuildServer.DeterminePullRequestId(context).Value,
context.AzureDevOpsAuthenticationOAuth(context.EnvironmentVariable("SYSTEM_ACCESSTOKEN"))),
- data.BuildRootDirectory);
+ GetReportIssuesToPullRequestSettings(data));
}
///
@@ -71,7 +71,7 @@ public class AzureDevOpsPullRequestSystem : BasePullRequestSystem
context.NotNull(nameof(context));
data.NotNull(nameof(data));
- var rootPath = data.RepositoryRootDirectory.GetRelativePath(data.BuildRootDirectory);
+ var rootPath = data.RepositoryRootDirectory.GetRelativePath(data.ProjectRootDirectory);
return context.IssueFileLinkSettingsForAzureDevOpsCommit(
data.RepositoryRemoteUrl,
diff --git a/Cake.Issues.Recipe/Content/tasks/pullrequestsystems/BasePullRequestSystem.cake b/Cake.Issues.Recipe/Content/tasks/pullrequestsystems/BasePullRequestSystem.cake
index 5ba8a59d..4cc800da 100644
--- a/Cake.Issues.Recipe/Content/tasks/pullrequestsystems/BasePullRequestSystem.cake
+++ b/Cake.Issues.Recipe/Content/tasks/pullrequestsystems/BasePullRequestSystem.cake
@@ -17,4 +17,25 @@ public abstract class BasePullRequestSystem : IIssuesPullRequestSystem
public abstract FileLinkSettings GetFileLinkSettings(
ICakeContext context,
IssuesData data);
+
+ ///
+ /// Returns settings for reporting issues to pull requests.
+ ///
+ /// The Cake context.
+ /// Settings for reporting issues to pull requests.
+ protected static IReportIssuesToPullRequestSettings GetReportIssuesToPullRequestSettings(IssuesData data)
+ {
+ var settings =
+ new ReportIssuesToPullRequestSettings(data.ProjectRootDirectory)
+ {
+ MaxIssuesToPost = IssuesParameters.PullRequestSystem.MaxIssuesToPost,
+ MaxIssuesToPostAcrossRuns = IssuesParameters.PullRequestSystem.MaxIssuesToPostAcrossRuns,
+ MaxIssuesToPostForEachIssueProvider = IssuesParameters.PullRequestSystem.MaxIssuesToPostForEachIssueProvider
+ };
+ foreach (var providerIssueLimit in IssuesParameters.PullRequestSystem.ProviderIssueLimits)
+ {
+ settings.ProviderIssueLimits.Add(providerIssueLimit.Key, providerIssueLimit.Value);
+ }
+ return settings;
+ }
}
\ No newline at end of file
diff --git a/Cake.Issues.Recipe/Content/tasks/pullrequestsystems/GitHubPullRequestSystem.cake b/Cake.Issues.Recipe/Content/tasks/pullrequestsystems/GitHubPullRequestSystem.cake
index 9ec25f35..c7198af0 100644
--- a/Cake.Issues.Recipe/Content/tasks/pullrequestsystems/GitHubPullRequestSystem.cake
+++ b/Cake.Issues.Recipe/Content/tasks/pullrequestsystems/GitHubPullRequestSystem.cake
@@ -27,7 +27,7 @@ public class GitHubPullRequestSystem : BasePullRequestSystem
context.NotNull(nameof(context));
data.NotNull(nameof(data));
- var rootPath = data.RepositoryRootDirectory.GetRelativePath(data.BuildRootDirectory);
+ var rootPath = data.RepositoryRootDirectory.GetRelativePath(data.ProjectRootDirectory);
return context.IssueFileLinkSettingsForGitHubCommit(
data.RepositoryRemoteUrl,
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 7cc912f6..94612542 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -44,10 +44,9 @@ jobs:
- powershell: ./build.ps1 --verbosity=diagnostic
workingDirectory: ./tests/frosting/net5.0
displayName: 'Run integration tests'
- # TODO Requires Cake.Issues.Reporting.Generic working with Frosting https://github.com/cake-contrib/Cake.Issues.Reporting.Generic/issues/361
- # - publish: $(Build.SourcesDirectory)/tests/script-runner/BuildArtifacts/output
- # artifact: Integration Tests Script Runner Windows (.NET Core tool)
- # displayName: 'Publish generated reports as build artifact'
+ - publish: $(Build.SourcesDirectory)/tests/frosting/net5.0/build/BuildArtifacts/output
+ artifact: Integration Tests Frosting Windows (.NET 5)
+ displayName: 'Publish generated reports as build artifact'
# Integration Tests Script Runner Windows (.NET Framework)
- job: Test_Script_Runner_Windows_DotNetFramework
displayName: 'Integration Tests Script Runner Windows (.NET Framework)'
diff --git a/docs/configuration.md b/docs/configuration.md
index 2e0c4a42..8fa05b34 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -46,9 +46,12 @@ By default [Cake.Git addin] will be used.
# Report creation
-| Cake.Issues.Recipe Property | Cake.Frosting.Issues.Recipe Property | Default Value | Description |
-|-------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|---------------|---------------------------------------------------------|
-| `IssuesParameters.Reporting.`
`ShouldCreateFullIssuesReport` | `IssuesContext.Parameters.Reporting.`
`ShouldCreateFullIssuesReport` | `true` | Indicates whether full issues report should be created. |
+| Cake.Issues.Recipe Property | Cake.Frosting.Issues.Recipe Property | Default Value | Description |
+|-------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|
+| `IssuesParameters.Reporting.`
`ShouldCreateFullIssuesReport` | `IssuesContext.Parameters.Reporting.`
`ShouldCreateFullIssuesReport` | `true` | Indicates whether full issues report should be created. |
+| `IssuesParameters.Reporting.`
`FullIssuesReportSettings` | `IssuesContext.Parameters.Reporting.`
`FullIssuesReportSettings` | `GenericIssueReportTemplate.HtmlDxDataGrid` template with `DevExtremeTheme.MaterialBlueLight` theme. | Settings for creating the full issues report. See [Template Gallery] for possible options. |
+
+[Template Gallery]: /docs/report-formats/generic/templates/
# Build server integration
@@ -60,9 +63,13 @@ By default [Cake.Git addin] will be used.
# Pull request integration
-| Cake.Issues.Recipe Property | Cake.Frosting.Issues.Recipe Property | Default Value | Description |
-|-----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|---------------|-------------------------------------------------------------------------|
-| `IssuesParameters.PullRequestSystem.`
`ShouldReportIssuesToPullRequest` | `IssuesContext.Parameters.PullRequestSystem.`
`ShouldReportIssuesToPullRequest` | `true` | Indicates whether issues should be reported to the pull request system. |
-| `IssuesParameters.PullRequestSystem.`
`ShouldSetPullRequestStatus` | `IssuesContext.Parameters.PullRequestSystem.`
`ShouldSetPullRequestStatus` | `true` | Indicates whether a status on the pull request should be set. |
+| Cake.Issues.Recipe Property | Cake.Frosting.Issues.Recipe Property | Default Value | Description |
+|---------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `IssuesParameters.PullRequestSystem.`
`ShouldReportIssuesToPullRequest` | `IssuesContext.Parameters.PullRequestSystem.`
`ShouldReportIssuesToPullRequest` | `true` | Indicates whether issues should be reported to the pull request system. |
+| `IssuesParameters.PullRequestSystem.`
`MaxIssuesToPost` | `IssuesContext.Parameters.PullRequestSystem.`
`MaxIssuesToPost` | `null` | Global number of issues which should be posted at maximum over all issue provider. Issues are filtered by priority and issues with a file path are prioritized. `null` won't set a global limit. |
+| `IssuesParameters.PullRequestSystem.`
`MaxIssuesToPostAcrossRuns` | `IssuesContext.Parameters.PullRequestSystem.`
`MaxIssuesToPostAcrossRuns` | `null` | Global number of issues which should be posted at maximum over all issue providers and across multiple runs. Issues are filtered by priority and issues with a file path are prioritized. `null` won't set a limit across multiple runs. |
+| `IssuesParameters.PullRequestSystem.`
`MaxIssuesToPostForEachIssueProvider` | `IssuesContext.Parameters.PullRequestSystem.`
`MaxIssuesToPostForEachIssueProvider` | `100` | Number of issues which should be posted at maximum for each issue provider. Issues are filtered by priority and issues with a file path are prioritized. `null` won't limit issues per issue provider. |
+| `IssuesParameters.PullRequestSystem.`
`ProviderIssueLimits` | `IssuesContext.Parameters.PullRequestSystem.`
`ProviderIssueLimits` | Empty | Issue limits for individual issue provider. The key must be the `IIssue.ProviderType` of a specific provider to which the limits should be applied to. |
+| `IssuesParameters.PullRequestSystem.`
`ShouldSetPullRequestStatus` | `IssuesContext.Parameters.PullRequestSystem.`
`ShouldSetPullRequestStatus` | `true` | Indicates whether a status on the pull request should be set. |
[Cake.Git addin]: https://cakebuild.net/extensions/cake-git/
diff --git a/nuspec/nuget/Cake.Issues.Recipe.nuspec b/nuspec/nuget/Cake.Issues.Recipe.nuspec
index fb5eaffc..0944f1c6 100644
--- a/nuspec/nuget/Cake.Issues.Recipe.nuspec
+++ b/nuspec/nuget/Cake.Issues.Recipe.nuspec
@@ -23,7 +23,7 @@ For recipe compatible with Cake Frosting see Cake.Frosting.Issues.Recipe.
Copyright © Pascal Berger
cake cake-recipe cake-issues
- https://github.com/cake-contrib/Cake.Issues.Recipe/releases/tag/1.1.0
+ https://github.com/cake-contrib/Cake.Issues.Recipe/releases/tag/1.2.0
diff --git a/tests/frosting/net5.0/build/Program.cs b/tests/frosting/net5.0/build/Program.cs
index c0d937c0..7461cb3a 100644
--- a/tests/frosting/net5.0/build/Program.cs
+++ b/tests/frosting/net5.0/build/Program.cs
@@ -33,9 +33,9 @@ public BuildContext(ICakeContext context)
: base(context, RepositoryInfoProviderType.Cli)
{
this.LogDirectoryPath = this.Parameters.OutputDirectory.Combine("logs");
+ this.Parameters.OutputDirectory = this.Parameters.OutputDirectory.Combine("output");
this.SolutionFilePath =
- this.State.BuildRootDirectory
- .Combine("..")
+ this.State.ProjectRootDirectory
.Combine("src")
.CombineWithFilePath("ClassLibrary1.sln");
}
@@ -74,7 +74,8 @@ public override void Run(BuildContext context)
var settings = new InspectCodeSettings() {
OutputFile = inspectCodeLogFilePath,
- ArgumentCustomization = x => x.Append("--no-build")
+ ArgumentCustomization = x => x.Append("--no-build"),
+ WorkingDirectory = context.State.ProjectRootDirectory
};
context.InspectCode(