Skip to content

Commit 86ec74f

Browse files
committed
(GitToolsGH-495) Allow milestones without issues
1 parent b295002 commit 86ec74f

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/GitReleaseManager.Core/Configuration/Config.cs

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public Config()
2727
ShaSectionHeading = "SHA256 Hashes of the release artifacts",
2828
ShaSectionLineFormat = "- `{1}\t{0}`",
2929
AllowUpdateToPublishedRelease = false,
30+
AllowMilestonesWithoutIssues = false,
3031
};
3132

3233
Export = new ExportConfig

src/GitReleaseManager.Core/Configuration/CreateConfig.cs

+3
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,8 @@ public class CreateConfig
3434

3535
[YamlMember(Alias = "allow-update-to-published")]
3636
public bool AllowUpdateToPublishedRelease { get; set; }
37+
38+
[YamlMember(Alias = "allow-milestone-without-issues")]
39+
public bool AllowMilestonesWithoutIssues { get; set; }
3740
}
3841
}

src/GitReleaseManager.Core/ReleaseNotes/ReleaseNotesBuilder.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public async Task<string> BuildReleaseNotesAsync(string user, string repository,
5858

5959
var numberOfCommits = await _vcsProvider.GetCommitsCountAsync(_user, _repository, @base, head).ConfigureAwait(false);
6060

61-
if (issues.Count == 0)
61+
if (issues.Count == 0 && !_configuration.Create.AllowMilestonesWithoutIssues)
6262
{
6363
var logMessage = string.Format(CultureInfo.CurrentCulture, "No closed issues have been found for milestone {0}, or all assigned issues are meant to be excluded from release notes, aborting release creation.", _milestoneTitle);
6464
throw new InvalidOperationException(logMessage);

0 commit comments

Comments
 (0)