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 pending changelog for unreleased changes #51

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

joeyparis
Copy link

@joeyparis joeyparis commented Apr 7, 2021

Objective

Solves #50. Adds the ability to generate a "pending changelog" of all unreleased changes. Our personal use case for this is so we can easily display a list of changes that should be tested but are not ready to be committed as a "release" yet.

Notes

Adds two new setting config options:
default_pending_changelog_filename which defaults to CHANGELOG_PENDING.md
default_pending_changelog_title which defaults to Pending Changes

I chose CHANGELOG_PENDING over PENDING_CHANGELOG so that CHANGELOG.md and CHANGELOG_PENDING.md are right next to each other in the file directory.

I'm not super happy with the naming conventions so I'm definitely open to suggestions about different names than just "pending".

How to test

Run rake for automated testing.
To test manually run bundle exec bin/codelog pending while you have unreleased changes then check CHANGELOG_PENDING.md for a list of your unreleased changes.

Breaking changes

No breaking changes.

Checklist

  • I have read the CONTRIBUTING document.
  • I have created a Codelog changefile with the changes made to the branch.
  • I have created a test proving that my feature/fix does what it intends to do.
  • I have updated the documentation accordingly. (If needed)

@joeyparis joeyparis marked this pull request as ready for review April 7, 2021 17:58
@emilianoLeite
Copy link
Member

Hey @joeyparis,

First of all I would like to thank you for the time and effort you put creating these issues and PRs, your contributions are greatly appreciated!

Secondly, my first reaction upon seeing this PR was

doesn't release --preview and bump --preview already cover this use case?

Maybe you didn't know about this flag?

Assuming you did know about the flag:

  • Could you please elaborate as to why the flag is not sufficient?
  • Is there any reason you opted for creating a separate file (CHANGELOG_PENDING.md) instead of only adding a section at the top of CHANGELOG.md? I believe that adding a section in CHANGELOG.md is simpler and less "intrusive" than creating a whole separate file.

@emilianoLeite emilianoLeite self-requested a review April 16, 2021 13:03
@joeyparis
Copy link
Author

Hey @emilianoLeite,

I did actually know about that flag which is what I used as an example for creating this pull request! The reason that flag is not sufficient for us is that it only works in the CLI, but the people at our company who it benefits the most have no CLI/programming experience.

Basically, our deployment process involves us deploying a bunch of changes to our staging environment where it is then tested. This pending changelog is what the testers use as a sort of checklist on what to test. The testers don't have access to any source code or CLI experience, so this is an easy way for them to know exactly what's included in this staging deployment without having to commit those changes to an actual release, as some may not pass testing.

I opted for creating a separate file because it made it easier to include the pending changelog on stage only and not production. That being said, from the perspective of just this ruby gem I agree that adding a section in CHANGELOG.md is the better solution. I'll go ahead and adjust this PR to instead add a section at the top of the changelog. I'll make it an optional flag though so the default behavior doesn't change.

@joeyparis
Copy link
Author

Okay, I believe I've adjusted the PR to work as requested.

There are also two minor unrelated changes included in this PR request. I added a test for the release preview flag, and additional regenerate tests to increase coverage to 100%, and fixed 2 Rubocop offenses for 100% rubocop satisfaction.

Co-authored-by: Guilherme Moreira Santos <gmoreirasantos1325@hotmail.com>
codelog.gemspec Outdated Show resolved Hide resolved
@joeyparis
Copy link
Author

I just wanted to check-in to see if we could get this merged into the official release! I've been using it locally now for a while and it's been very helpful. Thanks!

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.

4 participants