Skip to content
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

Merged
merged 8 commits into from
Jun 11, 2019

Conversation

pyrmont
Copy link
Contributor

@pyrmont pyrmont commented Jun 11, 2019

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.

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.
@pyrmont
Copy link
Contributor Author

pyrmont commented Jun 11, 2019

@gfx It doesn't completely automate things but this does part of what you were talking about wanting :)

@pyrmont pyrmont added the needs-review The PR needs to be reviewed label Jun 11, 2019
Copy link
Member

@gfx gfx left a 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! 🚀

@ashmaroli
Copy link
Contributor

@pyrmont If you're looking for automation, there might be a GitHub App that creates a changelog entry every time a PR is merged..

@pyrmont
Copy link
Contributor Author

pyrmont commented Jun 11, 2019

@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 pyrmont added author-action The PR has been reviewed but action by the author is needed and removed needs-review The PR needs to be reviewed labels Jun 11, 2019
@ashmaroli
Copy link
Contributor

@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

@pyrmont
Copy link
Contributor Author

pyrmont commented Jun 11, 2019

@ashmaroli Just that I am an idiot :P

@pyrmont pyrmont changed the title Add Rake task for generating CHANGELOG entries Add Rake task for generating changelog entries Jun 11, 2019
@pyrmont pyrmont merged commit aca4c29 into rouge-ruby:master Jun 11, 2019
@pyrmont pyrmont removed the author-action The PR has been reviewed but action by the author is needed label Jun 11, 2019
@pyrmont pyrmont deleted the feature.release-automation-tools branch January 8, 2020 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants