- Notifications
You must be signed in to change notification settings - Fork 9
Relax label checks #30
Conversation
| cc @Particular/nservicebus-maintainers |
danielmarbach left a comment
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.
A few comments
src/App/Program.cs Outdated
| { | ||
| Draft = false, | ||
| |
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.
Space not really needed
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.
fixed
src/App/app.config Outdated
| @@ -0,0 +1,3 @@ | |||
| <?xml version="1.0" encoding="utf-8"?> | |||
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 thinl you can ditch this
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.
app.config removed
src/Compiler/ReleaseNotesBuilder.cs Outdated
| public async Task<string> BuildReleaseNotes() | ||
| { | ||
| LoadMilestones(); | ||
| milestones = await gitHubClient.GetMilestones(); |
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.
Do we need the field assignment? Would it be better to pass in the milestones into the methods that need it?
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.
Yea, didn't want to churn to much but I'll fix that ugly one
| milestones = await gitHubClient.GetMilestones(); | ||
| | ||
| GetTargetMilestone(); | ||
| var issues = await GetIssues(targetMilestone); |
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.
Above method GetTargegMilestone sounds like a side effect free method but does assign magically a field. Like above I would return the milestone. Then this method used mostly locals and we can ditch the fields
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.
Fields now ditched
| * All closed issues for a milestone will be included. | ||
| * All issues must have exactly one `Type: xxx` label. E.g. `Type: Bug`, `Type: Feature`, `Type: Refactoring`, etc. Only issues labelled `Type: Bug` and `Type: Feature `will be included in the release notes. Issues with other `Type: xxx` labels will be included in the milestone but excluded from the release notes. | ||
| * All closed issues/PR's for a milestone will be included. | ||
| * Issues/PR's with a label `Type: Bug` will be included in a `Bugs` section |
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.
what about the Bug label (without the type)?
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.
Will fix
| var commitsText = Format(numberOfCommits == 1 ? "{0} commit" : "{0} commits", numberOfCommits); | ||
| | ||
| stringBuilder.AppendFormat(@"As part of this release we had [{0}]({1}) which resulted in [{2}]({3}) being closed.", commitsText, commitsLink, issuesText, targetMilestone.HtmlUrl()); | ||
| stringBuilder.Append($"As part of this release we had [{commitsText}]({commitsLink}) which resulted in [{issuesText}]({targetMilestone.HtmlUrl()}) being closed."); |
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.
tbh I'm not a big fan of the commit numbers. Even for a single bugfix it results in at least 2 commits because of the additional merge commit. How about removing that part?
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.
Raise a separate pull, this one is already getting to big?
src/Compiler/ReleaseNotesBuilder.cs Outdated
| Append(issues, "Feature", stringBuilder); | ||
| Append(issues, "Bug", stringBuilder); | ||
| var bugs = issues | ||
| .Where(issue => issue.Labels.Any(label => label.Name == "Type: Bug")) |
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.
how about Contains("Bug") ?
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.
Isn't that to wide, what if there is a label that contains those characters?
How about:
issue => issue.Labels.Any(label => label.Name == "Type: Bug" || label.Name == "Bug"
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.
good with that either as of now (maybe some repo decided to have a Critical Bug or Type:Bug label which would break this impl. but good to skip that as of now.
src/Compiler/ReleaseNotesBuilder.cs Outdated
| { | ||
| get { return "Type: "; } | ||
| } | ||
| public static string LabelPrefix => "Type: "; |
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.
this doesn't seem to be used in this class itself?
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.
Use by the tests but I think I can remove
| @timbussmann all you comments should now be addressed |
Since we're experimenting with a different lableling scheme for the core we're relaxing the requirements to always have a
Type:lable. Such rules can be enforced with other means if needed.Other changes