You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
When upgrading an extension, print information about changes since the user's previously installed version #6463
Describe the feature or problem you’d like to solve
When a user updates a CLI extension using gh extension upgrade <name>, the extension is immediately updated if there are updates available.
But the user doesn't get any information about the changes to the extension since their previous version - including warnings about any breaking changes.
Proposed solution
When an extension is updated with gh extension upgrade <name>, print information about the changes between the user's previous version and the new one.
This change information could be taken from releases on GitHub.com in the majority of cases.
A variation on this proposed solution would be to print the changes and prompt the user to check if they're sure they want to upgrade (given, for instance, that their might be breaking changes).
My team at GitHub maintains the github/gh-gei extension, and would benefit from this feature. We, as part of our documentation, instruct users to use upgrade regularly, but this inhibits our ability to push breaking changes as the user won't get any warning of them.
Thanks for the feature request. We've discussed this and we agree that the user should have at least some kind of access to a change log when upgrading an extension. For now, we're thinking of something along the lines of:
Printing the changelog for the new version, i.e. the equivalent of gh release view <new-version>; or
Printing changelogs for every release in the range of <old-version>..<new-version>.
However, when multiple extensions have been updated, I would suggest not printing the changelogs since that would become very noisy very fast. Instead, we could tell the user that to view the changelog of the latest release they can manually run gh release view -R owner/gh-myextension <new-version>. What do you think?
That approach seems reasonable to me. For the case of upgrading multiple extensions simultaneously, did you consider (a) showing the release notes only for major versions or (b) using a pager (e.g. less) to show large amounts of data? (a) seems like it could be a good compromise.
My vote would be for (2) - show all changelogs for the version range being upgraded.
I also agree that if doing a gh extension upgrade --all that printing changelogs is probably too noisy. But if the user upgrades a specific extension IMO it makes sense to print changelog by default.
For the case of upgrading multiple extensions simultaneously, did you consider (a) showing the release notes only for major versions or (b) using a pager (e.g. less) to show large amounts of data?
We briefly considered that but neither options sound appealing to me. Terminals (even when using pager) aren't very effective medium for displaying multiline data that belong under separate sections. I'd vote to keep gh ext upgrade --all output brief: 1 line per extension.
Activity
timrogers commentedon Oct 19, 2022
My team at GitHub maintains the
github/gh-geiextension, and would benefit from this feature. We, as part of our documentation, instruct users to useupgraderegularly, but this inhibits our ability to push breaking changes as the user won't get any warning of them.mislav commentedon Oct 25, 2022
Thanks for the feature request. We've discussed this and we agree that the user should have at least some kind of access to a change log when upgrading an extension. For now, we're thinking of something along the lines of:
gh release view <new-version>; or<old-version>..<new-version>.However, when multiple extensions have been updated, I would suggest not printing the changelogs since that would become very noisy very fast. Instead, we could tell the user that to view the changelog of the latest release they can manually run
gh release view -R owner/gh-myextension <new-version>. What do you think?timrogers commentedon Oct 25, 2022
That approach seems reasonable to me. For the case of upgrading multiple extensions simultaneously, did you consider (a) showing the release notes only for major versions or (b) using a pager (e.g.
less) to show large amounts of data? (a) seems like it could be a good compromise.dylan-smith commentedon Oct 25, 2022
My vote would be for (2) - show all changelogs for the version range being upgraded.
I also agree that if doing a
gh extension upgrade --allthat printing changelogs is probably too noisy. But if the user upgrades a specific extension IMO it makes sense to print changelog by default.timrogers commentedon Oct 25, 2022
Agreed on (2) as well - as @dylan-smith said - for the "upgrading a single extension" case.
mislav commentedon Oct 25, 2022
We briefly considered that but neither options sound appealing to me. Terminals (even when using pager) aren't very effective medium for displaying multiline data that belong under separate sections. I'd vote to keep
gh ext upgrade --alloutput brief: 1 line per extension.timrogers commentedon Oct 25, 2022
I'm cool with that, as long as we show the full changelog when updating a single extension ❤️ Thank you for taking the time to think this through!