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
Add 'released as part of' notes to issues when releasing #1654
Conversation
I went for option 3—adding a note during pre-release and trying not to repeat it later. Parsing the numbers from the previous releases was easier than my initial idea of scraping the issues themselves. |
If you want, you can see where I tested on https://github.com/blairconrad/FakeItEasy/releases/tag/5.5.0 and https://github.com/blairconrad/FakeItEasy/releases/tag/5.5.0-beta.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, @blairconrad! Simple and to the point.
I just have one minor remark, and a suggestion.
tools/FakeItEasy.Deploy/Program.cs
Outdated
} | ||
|
||
string baseName = release.Name.Split('-')[0]; | ||
return releases.Where(r => r.Prerelease && r.Name.StartsWith(baseName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this filter is sufficient. If the release is 5.1.1
, it will match 5.1.10-beta.1
.
Of course, under normal circumstances 5.1.10-xxx wouldn't exist... But I think it wouldn't hurt to include the dash in basename
, i.e. match only issues starting with 5.1.1-
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I thought of this last night. And was too lazy. In addition to thinking that 5.1.10-xxx wouldn't exist, even if it did, it just means we're remove issues attributed to it from the thanking mechanism for 5.1.1, which... is fine?
But I'm happy to change.
tools/FakeItEasy.Deploy/Program.cs
Outdated
@@ -63,9 +64,29 @@ public static async Task Main(string[] args) | |||
await UploadPackageToNuGetAsync(file, nugetServerUrl, nugetApiKey); | |||
} | |||
|
|||
var issueNumbersInCurrentRelease = ReleaseHelpers.GetIssueNumbersReferencedFromReleases(new[] { release }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe consider using static ReleaseHelpers
? If you prefer to keep it explicit, it's fine by me, but I just wanted to mention the possibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Thanks for the comments, @thomaslevesque. I pushed fixups. I figured I'd wait for the rebase until I'm squashing anyhow… |
string baseName = BaseName(release); | ||
return releases.Where(r => r.Prerelease && BaseName(r) == baseName); | ||
|
||
string BaseName(Release release) => release.Name.Split('-')[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @blairconrad. Squash it up!
ac83b93
to
41e2f8c
Compare
Thanks, @thomaslevesque. Squashed. |
Fixes #1652.