-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c31ee2
commit 14d1f08
Showing
14 changed files
with
178 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
TODO: | ||
|
||
|
||
---------------------------------------------------------------------------------------------------- | ||
Links: | ||
|
||
Release Notes | ||
- how to write release Notes | ||
- https://canny.io/blog/release-notes/ | ||
- https://www.appcues.com/blog/release-notes-examples | ||
- sample templates | ||
- https://gist.github.com/andreasonny83/24c733ae50cadf00fcf83bc8beaa8e6a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace tomware.Releasy; | ||
namespace tomware.Releasy.Changelog; | ||
|
||
internal sealed class ChangelogEntry | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace tomware.Releasy; | ||
namespace tomware.Releasy.Changelog; | ||
|
||
internal sealed record ChangelogParam | ||
( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace tomware.Releasy; | ||
namespace tomware.Releasy.Changelog; | ||
|
||
internal sealed record ChangelogUpdaterParam | ||
( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Text.Json; | ||
|
||
namespace tomware.Releasy.Releasenotes; | ||
|
||
internal sealed class ReleaseNoteCreator | ||
{ | ||
private readonly ReleaseNoteParam _releaseNoteParam; | ||
private readonly JsonSerializerOptions _jsonSerializerOptions = new() | ||
{ | ||
PropertyNameCaseInsensitive = true, | ||
WriteIndented = true | ||
}; | ||
|
||
public ReleaseNoteCreator(ReleaseNoteParam changelogParam) | ||
{ | ||
_releaseNoteParam = changelogParam; | ||
} | ||
|
||
public void Create() | ||
{ | ||
var releaseNoteEntry = ReleaseNoteEntry.Create( | ||
_releaseNoteParam.IssueId, | ||
_releaseNoteParam.Prefix, | ||
_releaseNoteParam.Tag, | ||
_releaseNoteParam.Message, | ||
_releaseNoteParam.Instructions | ||
); | ||
|
||
// Guid ToString(...) formats (https://learn.microsoft.com/en-us/dotnet/api/system.guid.tostring?view=net-6.0) | ||
var fileName = releaseNoteEntry.Id.ToString("N"); | ||
var path = $"{fileName}.{Constants.ReleaseNoteEntryFileExtension}"; | ||
|
||
var content = JsonSerializer.Serialize(releaseNoteEntry, _jsonSerializerOptions); | ||
File.WriteAllText(path, content); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
namespace tomware.Releasy.Releasenotes; | ||
|
||
internal sealed class ReleaseNoteEntry | ||
{ | ||
public Guid Id { get; set; } = Guid.NewGuid(); | ||
public string IssueId { get; set; } = string.Empty; | ||
public string Prefix { get; set; } = string.Empty; | ||
public string Tag { get; set; } = string.Empty; | ||
public string Message { get; set; } = string.Empty; | ||
public string[] Instructions { get; set; } = []; | ||
public DateTime CreatedAt { get; set; } = DateTime.Now; | ||
public string CreatedBy { get; set; } = Environment.UserName; | ||
|
||
public static ReleaseNoteEntry Create( | ||
string issueId, | ||
string prefix, | ||
string tag, | ||
string message, | ||
string[] instructions | ||
) | ||
{ | ||
return new ReleaseNoteEntry | ||
{ | ||
IssueId = issueId, | ||
Prefix = prefix.UpperCaseFirstLetter(), | ||
Tag = tag, | ||
Message = message, | ||
Instructions = instructions | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace tomware.Releasy.Releasenotes; | ||
|
||
internal sealed record ReleaseNoteParam | ||
( | ||
string IssueId, | ||
string Prefix, | ||
string Tag, | ||
string Message, | ||
string[] Instructions | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace tomware.Releasy; | ||
namespace tomware.Releasy.Releasenotes; | ||
|
||
internal sealed record ReleaseNotesParam | ||
( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters