Skip to content
This repository was archived by the owner on Sep 20, 2022. It is now read-only.

Commit d06fe64

Browse files
committed
Fixed running against a repo on the command line
1 parent c027a1f commit d06fe64

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/GitReleaseNotes/ReleaseNotesGenerator.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ public async Task<SemanticReleaseNotes> GenerateReleaseNotesAsync()
8484
currentReleaseInfo.Name = context.Version;
8585
currentReleaseInfo.When = DateTimeOffset.Now;
8686
}
87+
else
88+
{
89+
currentReleaseInfo.Name = "vNext";
90+
}
8791

8892
var releaseNotes = await GenerateReleaseNotesAsync(
8993
context, gitRepository, issueTracker,
@@ -129,7 +133,7 @@ public static async Task<SemanticReleaseNotes> GenerateReleaseNotesAsync(Release
129133
IncludeOpen = false
130134
};
131135

132-
var closedIssues = await issueTracker.GetIssuesAsync(filter);
136+
var closedIssues = (await issueTracker.GetIssuesAsync(filter)).ToArray();
133137

134138
// As discussed here: https://github.com/GitTools/GitReleaseNotes/issues/85
135139

@@ -165,7 +169,7 @@ public static async Task<SemanticReleaseNotes> GenerateReleaseNotesAsync(Release
165169
{
166170
if (issue.DateClosed.HasValue &&
167171
issue.DateClosed.Value > release.PreviousReleaseDate &&
168-
issue.DateClosed <= release.When)
172+
(release.When == null || issue.DateClosed <= release.When))
169173
{
170174
if (!semanticReleases.ContainsKey(release.Name))
171175
{

0 commit comments

Comments
 (0)