Skip to content
This repository was archived by the owner on Apr 6, 2024. It is now read-only.

Commit 742781d

Browse files
(GH-265) Use IIssue.FileLink in HtmlDxDataGrid (#316)
* Bump Cake.Issues from 0.9.0-beta0004 to 0.9.0-beta0005 in /src Bumps [Cake.Issues](https://github.com/cake-contrib/Cake.Issues) from 0.9.0-beta0004 to 0.9.0-beta0005. - [Release notes](https://github.com/cake-contrib/Cake.Issues/releases) - [Changelog](https://github.com/cake-contrib/Cake.Issues/blob/develop/GitReleaseManager.yaml) - [Commits](https://github.com/cake-contrib/Cake.Issues/commits) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump Cake.Issues.Testing from 0.9.0-beta0004 to 0.9.0-beta0005 in /src Bumps [Cake.Issues.Testing](https://github.com/cake-contrib/Cake.Issues) from 0.9.0-beta0004 to 0.9.0-beta0005. - [Release notes](https://github.com/cake-contrib/Cake.Issues/releases) - [Changelog](https://github.com/cake-contrib/Cake.Issues/blob/develop/GitReleaseManager.yaml) - [Commits](https://github.com/cake-contrib/Cake.Issues/commits) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * (GH-265) Use FileLink in HtmlDxDataGrid Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
1 parent 2cb017f commit 742781d

16 files changed

+105
-306
lines changed

demos/build.cake

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,26 @@ var target = Argument("target", "Default");
1313

1414
public class BuildData
1515
{
16-
public DirectoryPath RepoRootFolder { get; }
17-
public DirectoryPath SourceFolder { get; }
18-
public DirectoryPath DocsFolder { get; }
19-
public DirectoryPath TemplateGalleryFolder { get; }
20-
public List<IIssue> Issues { get; }
21-
22-
public BuildData(ICakeContext context)
23-
{
16+
public DirectoryPath RepoRootFolder { get; }
17+
public DirectoryPath SourceFolder { get; }
18+
public DirectoryPath DocsFolder { get; }
19+
public DirectoryPath TemplateGalleryFolder { get; }
20+
public List<IIssue> Issues { get; }
21+
22+
public BuildData(ICakeContext context)
23+
{
2424
this.RepoRootFolder = context.MakeAbsolute(context.Directory("./"));
2525
this.SourceFolder = this.RepoRootFolder.Combine("src");
2626
this.DocsFolder = this.RepoRootFolder.Combine("docs");
2727
this.TemplateGalleryFolder = this.RepoRootFolder.Combine("../docs/templates");
28+
2829
this.Issues = new List<IIssue>();
29-
}
30+
}
3031
}
3132

3233
Setup<BuildData>(setupContext =>
3334
{
34-
return new BuildData(setupContext);
35+
return new BuildData(setupContext);
3536
});
3637

3738
Task("Default")

demos/build/analyze/inspectcode.cake

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,18 @@ Task("Run-InspectCode")
1616
InspectCode(data.SourceFolder.CombineWithFilePath("ClassLibrary1.sln"), settings);
1717

1818
// Read issues
19+
var readIssuesSettings = new ReadIssuesSettings(data.RepoRootFolder)
20+
{
21+
FileLinkSettings =
22+
IssueFileLinkSettingsForGitHubBranch(
23+
new System.Uri("https://github.com/cake-contrib/Cake.Issues.Reporting.Generic"),
24+
"develop",
25+
"demos"
26+
)
27+
};
28+
1929
data.Issues.AddRange(
2030
ReadIssues(
2131
InspectCodeIssuesFromFilePath(inspectCodeLogFilePath),
22-
data.RepoRootFolder));
32+
readIssuesSettings));
2333
});

demos/build/analyze/markdownlint.cake

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ Task("Lint-DemoDocumentation")
2020
// Read issues
2121
var readIssuesSettings = new ReadIssuesSettings(data.RepoRootFolder)
2222
{
23-
Run = "Demos documentation"
23+
Run = "Demos documentation",
24+
FileLinkSettings =
25+
IssueFileLinkSettingsForGitHubBranch(
26+
new System.Uri("https://github.com/cake-contrib/Cake.Issues.Reporting.Generic"),
27+
"develop",
28+
"demos"
29+
)
2430
};
2531

2632
data.Issues.AddRange(
@@ -47,7 +53,13 @@ Task("Lint-TemplateGalleryDocumentation")
4753
// Read issues
4854
var readIssuesSettings = new ReadIssuesSettings(data.RepoRootFolder)
4955
{
50-
Run = "Template gallery documentation"
56+
Run = "Template gallery documentation",
57+
FileLinkSettings =
58+
IssueFileLinkSettingsForGitHubBranch(
59+
new System.Uri("https://github.com/cake-contrib/Cake.Issues.Reporting.Generic"),
60+
"develop",
61+
"docs"
62+
)
5163
};
5264

5365
data.Issues.AddRange(

demos/build/build/build.cake

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,20 @@ Task("Build")
3737
#endif
3838

3939
// Read issues
40+
var readIssuesSettings = new ReadIssuesSettings(data.RepoRootFolder)
41+
{
42+
FileLinkSettings =
43+
IssueFileLinkSettingsForGitHubBranch(
44+
new System.Uri("https://github.com/cake-contrib/Cake.Issues.Reporting.Generic"),
45+
"develop",
46+
"demos"
47+
)
48+
};
49+
4050
data.Issues.AddRange(
4151
ReadIssues(
4252
MsBuildIssuesFromFilePath(
4353
msBuildLogFilePath,
4454
MsBuildBinaryLogFileFormat),
45-
data.RepoRootFolder));
55+
readIssuesSettings));
4656
});

demos/build/create-reports/create-reports-htmldxdatagrid-file-linking.cake

Lines changed: 0 additions & 19 deletions
This file was deleted.

demos/build/create-reports/create-reports-htmldxdatagrid.cake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#load create-reports-htmldxdatagrid-disable-header.cake
4040
#load create-reports-htmldxdatagrid-disable-filtering.cake
4141
#load create-reports-htmldxdatagrid-disable-searching.cake
42-
#load create-reports-htmldxdatagrid-file-linking.cake
4342
#load create-reports-htmldxdatagrid-custom-script-location.cake
4443
#load create-reports-htmldxdatagrid-enable-exporting.cake
4544
#load create-reports-htmldxdatagrid-custom-export-filename.cake
@@ -87,7 +86,6 @@ Task("Create-Reports-HtmlDxDataGrid")
8786
.IsDependentOn("Create-Reports-HtmlDxDataGrid-Disable-Header")
8887
.IsDependentOn("Create-Reports-HtmlDxDataGrid-Disable-Filtering")
8988
.IsDependentOn("Create-Reports-HtmlDxDataGrid-Disable-Searching")
90-
.IsDependentOn("Create-Reports-HtmlDxDataGrid-File-Linking")
9189
.IsDependentOn("Create-Reports-HtmlDxDataGrid-Custom-Script-Location")
9290
.IsDependentOn("Create-Reports-HtmlDxDataGrid-Enable-Exporting")
9391
.IsDependentOn("Create-Reports-HtmlDxDataGrid-Custom-Export-Filename");

docs/templates/htmldxdatagrid-demo-filelinking.html

Lines changed: 0 additions & 213 deletions
This file was deleted.

docs/templates/htmldxdatagrid.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,6 @@ CreateIssueReport(
208208
(<a href="https://github.com/cake-contrib/Cake.Issues.Reporting.Generic/blob/develop/demos/build/create-reports/create-reports-htmldxdatagrid-change-title.cake" target="_blank">Source Code</a>)
209209
* <a href="htmldxdatagrid-demo-disableheader.html" target="_blank">Disable header</a>
210210
(<a href="https://github.com/cake-contrib/Cake.Issues.Reporting.Generic/blob/develop/demos/build/create-reports/create-reports-htmldxdatagrid-disable-header.cake" target="_blank">Source Code</a>)
211-
* <a href="htmldxdatagrid-demo-filelinking.html" target="_blank">File linking</a>
212-
(<a href="https://github.com/cake-contrib/Cake.Issues.Reporting.Generic/blob/develop/demos/build/create-reports/create-reports-htmldxdatagrid-file-linking.cake" target="_blank">Source Code</a>)
213211
* <a href="htmldxdatagrid-demo-disablefiltering.html" target="_blank">Disable filtering</a>
214212
(<a href="https://github.com/cake-contrib/Cake.Issues.Reporting.Generic/blob/develop/demos/build/create-reports/create-reports-htmldxdatagrid-disable-filtering.cake" target="_blank">Source Code</a>)
215213
* <a href="htmldxdatagrid-demo-disablesearching.html" target="_blank">Disable searching</a>

src/Cake.Issues.Reporting.Generic.Tests/Cake.Issues.Reporting.Generic.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
3131
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
3232
<PackageReference Include="Cake.Testing" Version="0.33.0" />
33-
<PackageReference Include="Cake.Issues.Testing" Version="0.9.0-beta0004" />
33+
<PackageReference Include="Cake.Issues.Testing" Version="0.9.0-beta0005" />
3434
<PackageReference Include="HtmlAgilityPack" Version="1.11.24" />
3535
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
3636
<PrivateAssets>all</PrivateAssets>

src/Cake.Issues.Reporting.Generic.Tests/ExpandoObjectExtensionsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void Should_Give_Correct_Result()
4141
var result = expandoObject.SerializeToJsonString();
4242

4343
// Then
44-
result.ShouldBe("{\"ProviderType\":\"providerType\",\"ProviderName\":\"providerName\",\"Run\":null,\"Priority\":null,\"PriorityName\":null,\"ProjectPath\":null,\"ProjectName\":null,\"FilePath\":null,\"FileDirectory\":null,\"FileName\":null,\"Line\":null,\"Rule\":null,\"RuleUrl\":null,\"MessageText\":\"message\"}");
44+
result.ShouldBe("{\"ProviderType\":\"providerType\",\"ProviderName\":\"providerName\",\"Run\":null,\"Priority\":null,\"PriorityName\":null,\"ProjectPath\":null,\"ProjectName\":null,\"FilePath\":null,\"FileDirectory\":null,\"FileName\":null,\"FileLink\":null,\"Line\":null,\"Rule\":null,\"RuleUrl\":null,\"MessageText\":\"message\"}");
4545
}
4646
}
4747

@@ -81,7 +81,7 @@ public void Should_Give_Correct_Result()
8181
var result = expandoObjects.SerializeToJsonString();
8282

8383
// Then
84-
result.ShouldBe("[{\"ProviderType\":\"providerType1\",\"ProviderName\":\"providerName1\",\"Run\":null,\"Priority\":null,\"PriorityName\":null,\"ProjectPath\":null,\"ProjectName\":null,\"FilePath\":null,\"FileDirectory\":null,\"FileName\":null,\"Line\":null,\"Rule\":null,\"RuleUrl\":null,\"MessageText\":\"message1\"},{\"ProviderType\":\"providerType1\",\"ProviderName\":\"providerName1\",\"Run\":null,\"Priority\":null,\"PriorityName\":null,\"ProjectPath\":null,\"ProjectName\":null,\"FilePath\":null,\"FileDirectory\":null,\"FileName\":null,\"Line\":null,\"Rule\":null,\"RuleUrl\":null,\"MessageText\":\"message1\"}]");
84+
result.ShouldBe("[{\"ProviderType\":\"providerType1\",\"ProviderName\":\"providerName1\",\"Run\":null,\"Priority\":null,\"PriorityName\":null,\"ProjectPath\":null,\"ProjectName\":null,\"FilePath\":null,\"FileDirectory\":null,\"FileName\":null,\"FileLink\":null,\"Line\":null,\"Rule\":null,\"RuleUrl\":null,\"MessageText\":\"message1\"},{\"ProviderType\":\"providerType1\",\"ProviderName\":\"providerName1\",\"Run\":null,\"Priority\":null,\"PriorityName\":null,\"ProjectPath\":null,\"ProjectName\":null,\"FilePath\":null,\"FileDirectory\":null,\"FileName\":null,\"FileLink\":null,\"Line\":null,\"Rule\":null,\"RuleUrl\":null,\"MessageText\":\"message1\"}]");
8585
}
8686
}
8787
}

0 commit comments

Comments
 (0)