Skip to content

Commit 6283f87

Browse files
committed
Add option to allow updating published release
1 parent a3c1fa3 commit 6283f87

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Source/GitReleaseManager/Configuration/Config.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public Config()
3232
IncludeShaSection = false,
3333
ShaSectionHeading = "SHA256 Hashes of the release artifacts",
3434
ShaSectionLineFormat = "- `{1}\t{0}`",
35+
AllowUpdatePublishedRelease = false,
3536
};
3637

3738
Export = new ExportConfig

Source/GitReleaseManager/Configuration/CreateConfig.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,8 @@ public class CreateConfig
3838

3939
[YamlMember(Alias = "sha-section-line-format")]
4040
public string ShaSectionLineFormat { get; set; }
41+
42+
[YamlMember(Alias = "allow-update-published")]
43+
public bool AllowUpdatePublishedRelease { get; set; }
4144
}
4245
}

Source/GitReleaseManager/GitHubProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public async Task<Release> CreateReleaseFromMilestone(string owner, string repos
153153
{
154154
_logger.Warning("A release for milestone {Milestone} already exists, and will be updated", milestone);
155155

156-
if (!release.Draft)
156+
if (!release.Draft && !_configuration.Create.AllowUpdatePublishedRelease)
157157
{
158158
throw new InvalidOperationException("Release is not in draft state, so not updating.");
159159
}

0 commit comments

Comments
 (0)