-
-
Notifications
You must be signed in to change notification settings - Fork 849
add breaking-changes section to changelog #530
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 breaking-changes section to changelog #530
Conversation
@@ -129,6 +132,9 @@ def self.setup_parser(options) | |||
opts.on("--enhancement-labels x,y,z", Array, 'Issues with the specified labels will be always added to "Implemented enhancements" section. Default is \'enhancement,Enhancement\'') do |list| | |||
options[:enhancement_labels] = list | |||
end | |||
opts.on("--breacking-labels x,y,z", Array, 'Issues with these lables will be added to a new section, called "Breaking Changes". Default is \'backwards-incompatible\'') do |list| |
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.
Typos:
breacking-labels
=>breaking-labels
lables
=>labels
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 like this feature.
Q: If a PR is marked as both Breaking and an Enhancement, it would be in both lists, right?
Looking at the generated CHANGELOG.md, I feel that it'd be cool to place any breaking changes section FIRST. |
So, there's room for careful refactoring - or disabling a RuboCop check to pass this:
|
I tried to refactor it, but didn't find a clean solution. If anybody has ideas please let me know. I will try to place the section at the beginning. |
@bastelfreak Failing forward is also a good option! Add a Don't worry about it. |
@olleolleolle I reordered the output, the breaking stuff should now be the first. |
Hi @olleolleolle, what needs to be done to get this merged? |
I made some tests again and I'm not 100% if it still works after I changed the ordering. I will have a look tomorrow. |
No, backwards-incompatible (or "breaking") changes are always features because you are enhancing the project with behavior that is desirable, so it would not make sense to put them in both sections. For a standardized workflow around this, see http://keepachangelog.com/ . It's great, because it tries to make a portable standardized changelog format that works anywhere, and has a formal definition for what goes in each section and how to adhere to http://semver.org/ . |
f24e605
to
935a1ca
Compare
Hi @olleolleolle @skywinder could you recheck this PR? |
Hi @olleolleolle, can you check this PR as well? Would be awesome! |
|
935a1ca
to
5bc498e
Compare
|
# This method sort issues by types | ||
# (bugs, features, or just closed issues) by labels | ||
# | ||
# @param [Array] issues | ||
# @param [Array] pull_requests | ||
# @return [Array] tuple of filtered arrays: (Bugs, Enhancements Issues) | ||
# @return [Array] tuple of filtered arrays: (Bugs, Enhancements, Breaking stuff, Issues) | ||
def parse_by_sections(issues, pull_requests) |
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'm looking at the code and I'm want some verification: is the goal that an issue is always in 1 section, preferably by a label but otherwise in the container "issues". For Pull requests it should be in 1 section but if it's not, it remains in the pull_requests array (that's modified in place). Correct?
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.
At the moment, the breaking change appears in multiple sections. See https://github.com/voxpupuli/puppet-rabbitmq/blob/33bc9ef7f69155d602f1cdd5abf5a794d1d8a27c/CHANGELOG.md#v700-2017-09-14 for example of where this branch was recently used.
@hunner has suggested this actually might not be the best behaviour. #530 (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.
ekohl@f5cb492 is my attempt at a cleanup and has tests. I kept current code if multiple labels match but maybe breaking should be at the top.
@olleolleolle I added the commit from @ekohl, could you take a look again? |
@bastelfreak Thanks for that. Could you fix the lint complaints? |
@bastelfreak Thanks for passing lint checks, I can merge this from here. |
Should this be documented on the README? |
Hi,
this PR allows us to create another section in the changelog, for breaking changes. This is not a 100% implementation of #316, but may help people. Tested this successfully on https://github.com/voxpupuli/puppet-dhcp/blob/master/CHANGELOG.md