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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rake tasks to merge and create Changelog entries #131

Merged
merged 1 commit into from Sep 30, 2020

Conversation

marcandre
Copy link
Contributor

Fixes rubocop/rubocop#8697

After yet another Changelog merge issue, I decided to write some code to avoid it.

This PR adds a rake task to merge entries in CHANGELOG/ according to the prefix of their path: "new" (feature), (bug) "fix" or "change". It merges those with any existing entries in the unreleased section of the Changelog, so it can be done at any moment, is backward compatible, and nobody is forced to use it (except before cutting a release, and I've added a check for that 馃槄).

Other rake task cl:new, cl:fix, cl:change create an entry file (default use the last commit's message & git config).

For a contributor, the workflow looks like this:

  • make a contribution, test it, etc.
  • git commit (enter a good commit message, optionally starting with [Fixes #xxx])
  • bundle exec rake cl:fix
  • modify file if desired
  • git commit --amend
  • no worry about any changelog conflict / forgetting to move it to the right spot if a release is made before it is merged

@bbatsov any objection that I use this in rubocop-ast? May I adapt it for rubocop too?

@marcandre marcandre force-pushed the changelog branch 7 times, most recently from 50abd66 to ab160bd Compare September 29, 2020 07:01
@bbatsov
Copy link
Contributor

bbatsov commented Sep 29, 2020

@bbatsov any objection that I use this in rubocop-ast?

No objections.

May I adapt it for rubocop too?

Sure. Might be good to use it for a while in rubocop-ast and refine the workflow (if needed) first, though.

tasks/changelog.rake Outdated Show resolved Hide resolved
tasks/changelog.rb Outdated Show resolved Hide resolved
@marcandre marcandre merged commit 3c180c1 into rubocop:master Sep 30, 2020
@marcandre marcandre deleted the changelog branch September 30, 2020 00:54
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.

Changelog conflicts
2 participants