Repository navigation
CLI changelog #111
Description
Activity
I'm going to split this into three stages.
- An automated way to catalog potential release notes from PR titles (Like desktop does in https://github.com/desktop/desktop/blob/development/script/draft-release/run.ts)
- Use the result of step 1 to build release notes for github/homebrew-gh
- Add the
gh --changelogflag that will show the release notes.
Any value or reason to make
gh changelogan alternative cmd, like we did withgh version?Reacted by Corey JohnsonBased on what I've learned, I think using actions to do this is probably more complicated than it needs to be. See #189 for more details.
This is trickier than I thought. Here are some options and I'm not sure what the best way forward is.
Use a
changelog.txtfileThis is easy to edit, easy edit for people to find in the repo, and easy for scripts to manipulate. But because we compile to a binary it is hard to get that text into the app via
gh changelog. I think the way to do this is to add an extra build step to our makefile and to .goreleaser.yml that will convert the changelog into a go file.Use a
changelog.jsonfileThis is a lot like the
changelog.txtbut it makes writing scripts to update it a little easier.Use a
changelog.gofileThis makes it very easy to display the changelog in
gh changelog, but it is less readable by users, and it's harder to write scripts that will directly edit a go file. It is also harder to turn this go file into something we can post in the relase notes on https://github.com/github/homebrew-gh/releases/tag/v0.3.5.
I feel like I've spent too much time thinking about this and there is a very simple solution that eludes me. But I can't figure it out.
Perhaps the easiest solution for now is:
gh changelog= opens browser tab to the new marketing site > release notes pageReacted by Corey JohnsonAs for generating the changelog to use in online release notes, I've spiked something really quick: #199
Now, assuming that we've gotten the GitHub Releases changelog out of the way, the next step is "linking" those notes into the binary so that
gh changelogcan do something useful. Personally, I don't feel really strongly that we should have a command to display the changelog; perhaps we could simply link to release notes from the man page (gh help). If we really do want to have a special command for this, I second @tierninho's excellent idea that we could simply have it open a URL, rather than having to figure out how to embed release notes into the binary itself. That way, the definite source for a changelog is the GitHub Release itself (which can also be amended by hand post-release if we want to polish up the notes).Reacted by Nate Smith and Corey Johnsoni agree with mislav's assessment re: not needing a changelog command. we have
gh versionwhich could include a link to a release with a changelog and also link fromgh help.Personally, I don't feel really strongly that we should have a command to display the changelog; perhaps we could simply link to release notes from the man page (gh help)
I can get behind that too. Looking at
gh helpit is a little crowded. Having the release notes link with the version command makes sense to me since release notes and version are pretty linked. How do people feel about havintgh versionoutput something like...gh version 0.3.5 (2020-01-06) Release Notes: https://github.com/github/homebrew-gh/releases/tag/v0.3.5How do people feel about havint gh version output something like...
👍 on the idea and in favor of dropping
gh-changelogaltogether we implement this- added a commit that references this issue
on Sep 28, 2021 - added a commit that references this issue
on Jan 6, 2026
Describe the feature or problem you’d like to solve
Is there a need to display a changelog for CLI, potentially via the command line?
Proposed solution
Something like
gh --changelogor similar so users can learn more about updates. It is helpful for me in case I need to go back and see when a feature was released or if I missed the marketing material.