-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[spike] - automate changelog with changie #4722
Conversation
There's a PR currently out for changie to add header/footer sections that we should be able to use for the Contributors section. See #233 |
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.
This is super cool! I took it for a spin locally, and found it quite simple to use :) None of my comments below should be considered as blocking our adoption of changie
/ this overall approach.
With external contributors in mind:
- I think we'll need a more detailed update to PR template +
CONTRIBUTING.md
docs - The CLI prompt with
changie
is very cool, but I'm wondering — do we need contributors to actually installchangie
themselves? Can we just keep around a "sample" change file )(.changes/sample_change.md
) that they can copy/paste/update? The only risk is, it's unlikely users would manually update thetime
field, so chronological ordering may not be totally right
changie batch 1.1.1 when ready to create your release. This deletes all the yaml files and combines them into a single markdown file.
To ask a favorite question: How do we handle backports? If I'm following right, we:
- Create a change file (
changie new
) for the fix - Backport the fix along with its change file
- Generate a new changelog (
changie batch
) on themain
branch for the next minor version, and on the1.x.latest
branch for the next patch version - Upshot: the change is included in both versions, and its changelog entry is reflected in both places
To date, my personal habit when backporting has been to add its changelog entry under the patch release only—the implication being, a v1.0.x patch fix will also be included in v1.1.0. I'm ok with this shift, to "double-entry bookkeeping." A consistent adoption of either approach is preferable to inconsistency, which is what we have today.
Only thing worth calling out: Patch release notes / changelog entries will only be reflected on the 1.x.latest
branches. The main
branch entries will only reflect minor versions. I suppose we add some handling for that in our "big" CHANGELOG.md
reconciliation process...?
changie
does not currently have the ability to generate footer sections (ourContributors
) so you have to runscripts/add-contributors.py
to generate that section.
🤞 for miniscruff/changie#233!
You can also directly modify the markdown file if needed. This will not break anything.
honestly, this is very reassuring :)
- label: Under the Hood | ||
- label: Breaking Changes | ||
- label: Docs | ||
- label: Dependancies |
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.
- label: Dependancies | |
- label: Dependencies |
@@ -0,0 +1,8 @@ | |||
## 1.1.1 - February 14, 2022 |
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.
Now that we have this capability, I like the idea of batching changelog entries in a few different ways:
- Version-specific changelogs, which also go in GitHub release notes for each prerelease
- A "combined" changelog for each final release, that batch changes from all prereleases (e.g. v1.1.0b1 + v1.1.0b2 + v1.1.0rc1 = v1.1.0 [final]) — this should go into the final version's release notes
- A full "combined" changelog, to live continually at
CHANGELOG.md
To that end, changie batch
gets us the first, and we should be able to write some dead-simple scripts that get us 2 + 3, by combining the components produced by (1)
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.
Hey I found this thread as it was linked to the changie PR above and want to give my two cents. Changie currently has no way of specifying something as pre-release, alpha or similar. My recommendation would be to use the changie batch --keep
option and move the yaml files into a separate folder before release. Then when the final version is ready, move all the yamls back into unreleased and run batch again. Then 3 can be done by doing changie merge
.
If this workflow works for you I would be happy to add it to the Changie roadmap as it is a common workflow when using beta and release candidates. Thanks for considering changes and reach out if you need anything else.
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.
Would there be value in incrementally rolling up? ie v1.1.0b1 rolls into v1.1.0b2 rolls into v1.1.0rc1 rolls into v1.1.0(final) as opposed to not rolling up until the final release?
changie already has the ability to generate the changelog entry with a --keep
flag when running the batch
command. That generates the markdown file that can be merged in but does not delete the associated yaml files. You would still need to delete the associate entry from the full cahngelog file with this method though so I'm not sure how much it would save over just have a simple script that could accomplish it for us.
Either way, this makes a lot of sense and would really help clean up our CHANGELOG
as it can be confusing now when there are multiple changlog entries under an rc release and non under the final release (ie 0.21.0). Definitely achievable.
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 realizing now rolling up wouldn't be ideal for what gets posted to each individual release. So scratch that.
I think @miniscruff's suggested approach would work nicely for what we need. We can either write a script to automate the process he describes or contribute that change back to changie if @miniscruff is open to that.
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 don't mind adding it if it works for you, just let me know and I can create an issue for it ( or you can start a discussion for ideas )
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.
@miniscruff I would really appreciate if you open an issue for this. It would be a valuable addition for us for sure!
Thanks for the feedback @jtcohen6! Agree 💯 that there needs to be better docs in Creating a template file for Contributors could work but I see two issues:
Out of curiosity, what is the reluctance in asking our contributors to install changie? His docs are easy to follow and cover all operating systems. |
Just, knee-jerk reluctance to asking anyone to install anything locally if they don't have to? I did find Given that contributors are already setting up local dev envs (in most cases), it's hardly much more work. In addition to a GHA that checks for a new change file—could we even create a GHA that runs |
Interesting for sure! I'll look into it. Closing this PR as the spike is done. I'll open a new PR soon with the actual implementation and without fake changes. |
resolves #4652
Description
Add
changie
to automateCHANGELOG
generation.This PR creates a fake 1.1.1 release. Look through commits to see the steps that get taken while creating the
CHANGELOG
itself.changie Workflow
changie new
to create ayaml
file that holds the info needed to generate the changelog line. Merge your branch in.changie batch 1.1.1
when ready to create your release. This deletes all theyaml
files and combines them into a single markdown file.changie
does not currently have the ability to generate footer sections (ourContributors
) so you have to runscripts/add-contributors.py
to generate that section. You can also directly modify the markdown file if needed. This will not break anything.changie merge
to merge that markdown file into the existingCHANGELOG
.Checklist
CHANGELOG.md
and added information about my change