Skip to content

Commit 44d7c93

Browse files
committed
Make sure the SingleMilestone integration test is sensitive to the fact that we want contributors to be included in the release notes or not.
1 parent 272bd03 commit 44d7c93

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/GitReleaseManager.IntegrationTests/ReleaseNotesBuilderIntegrationTests.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,17 @@ public async Task SingleMilestone()
6666
var configuration = ConfigurationProvider.Provide(currentDirectory, fileSystem);
6767
configuration.IssueLabelsExclude.Add("Internal Refactoring"); // This is necessary to generate the release notes for GitReleaseManager version 0.12.0
6868

69+
// Indicate whether you want to include the 'Contributors' section in the release notes
70+
configuration.Create.IncludeContributors = true;
71+
72+
// Pick the template based on whether you want to include the 'Contributors' section in the release notes
73+
var templatePath = configuration.Create.IncludeContributors
74+
? ReleaseTemplates.CONTRIBUTORS_NAME
75+
: ReleaseTemplates.DEFAULT_NAME;
76+
6977
var vcsProvider = new GitHubProvider(_gitHubClient, _mapper);
7078
var releaseNotesBuilder = new ReleaseNotesBuilder(vcsProvider, _logger, fileSystem, configuration, new TemplateFactory(fileSystem, configuration, TemplateKind.Create));
71-
var result = await releaseNotesBuilder.BuildReleaseNotesAsync("GitTools", "GitReleaseManager", "0.12.0", ReleaseTemplates.DEFAULT_NAME).ConfigureAwait(false); // 0.12.0 contains a mix of issues and PRs
79+
var result = await releaseNotesBuilder.BuildReleaseNotesAsync("GitTools", "GitReleaseManager", "0.12.0", templatePath).ConfigureAwait(false); // 0.12.0 contains a mix of issues and PRs
7280
Debug.WriteLine(result);
7381
ClipBoardHelper.SetClipboard(result);
7482
}

0 commit comments

Comments
 (0)