-
Notifications
You must be signed in to change notification settings - Fork 732
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 Rake task for generating changelog entries #1167
Add Rake task for generating changelog entries #1167
Conversation
This commit adds a rake task to assist in writing CHANGELOG updates. The task generates messages using the first line of the commit message. It automatically inserts links for references that begin with `#` as well as providing a heading and a link to compare against the previous version.
@gfx It doesn't completely automate things but this does part of what you were talking about wanting :) |
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.
Awesome!! You are the hero! 🚀
@pyrmont If you're looking for automation, there might be a GitHub App that creates a changelog entry every time a PR is merged.. |
@ashmaroli Yeah, for future automation efforts something like that might be preferable. The way CHANGELOG works currently, the individual entries need to be sorted by lexer (or otherwise in general) and that requires a human editor. The purpose of this Rake task is to really get most of the busywork done in terms of formatting the individual entries. |
@pyrmont Any reason why you opted to chain with a trailing dot instead of a leading on the newline? def prev_version
@prev_version ||= @repo.tags
.select { |t| t.name.match?(/^v\d+\.\d+\.\d$/) } # Ruby 2.4 String#match? ?
.map { |t| t.name.slice(1..-1).split(".").map(&:to_i) }
.sort { |a, b| sort_versions(a, b) }
.last
.join(".")
.prepend("v")
end |
@ashmaroli Just that I am an idiot :P |
This commit adds a Rake task to assist in writing CHANGELOG updates. The task generates messages using the first line of the commit message. It automatically inserts links for references that begin with
#
as well as providing a heading and a link to compare against the previous version.