Skip to content

Commit d9abf07

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 501dec2 commit d9abf07

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
@@ -67,9 +67,17 @@ public async Task SingleMilestone()
6767
var configuration = ConfigurationProvider.Provide(currentDirectory, fileSystem);
6868
configuration.IssueLabelsExclude.Add("Internal Refactoring"); // This is necessary to generate the release notes for GitReleaseManager version 0.12.0
6969

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

0 commit comments

Comments
 (0)