Skip to content

Commit 4c741ab

Browse files
committed
(GitToolsGH-495) Allow milestones without issues
1 parent df62fc7 commit 4c741ab

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
IncludeContributors = false,
3132
};
3233

src/GitReleaseManager.Core/Configuration/CreateConfig.cs

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ public class CreateConfig
3535
[YamlMember(Alias = "allow-update-to-published")]
3636
public bool AllowUpdateToPublishedRelease { get; set; }
3737

38+
[YamlMember(Alias = "allow-milestone-without-issues")]
39+
public bool AllowMilestonesWithoutIssues { get; set; }
40+
3841
[YamlMember(Alias = "include-contributors")]
3942
public bool IncludeContributors { get; set; }
4043
}

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)