Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(GH-495) Allow milestones without issues #615

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/GitReleaseManager.Core/Configuration/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public Config()
ShaSectionHeading = "SHA256 Hashes of the release artifacts",
ShaSectionLineFormat = "- `{1}\t{0}`",
AllowUpdateToPublishedRelease = false,
AllowMilestonesWithoutIssues = false,
};

Export = new ExportConfig
Expand Down
3 changes: 3 additions & 0 deletions src/GitReleaseManager.Core/Configuration/CreateConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@ public class CreateConfig

[YamlMember(Alias = "allow-update-to-published")]
public bool AllowUpdateToPublishedRelease { get; set; }

[YamlMember(Alias = "allow-milestone-without-issues")]
public bool AllowMilestonesWithoutIssues { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public async Task<string> BuildReleaseNotesAsync(string user, string repository,

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

if (issues.Count == 0)
if (issues.Count == 0 && !_configuration.Create.AllowMilestonesWithoutIssues)
{
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);
throw new InvalidOperationException(logMessage);
Expand Down
Loading