Skip to content

When upgrading an extension, print information about changes since the user's previously installed version #6463

Open

Description

@timrogers

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).

Activity

  1. added
    enhancement
    on Oct 19, 2022
  2. added
    needs-triage
    on Oct 19, 2022
  3. timrogers commented on Oct 19, 2022

    @timrogers
    ContributorAuthor

    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.

  4. added
    discuss
    and removed
    needs-triage
    on Oct 20, 2022
  5. mislav commented on Oct 25, 2022

    @mislav
    Contributor

    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:

    1. Printing the changelog for the new version, i.e. the equivalent of gh release view <new-version>; or
    2. 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?

  6. removed
    discuss
    on Oct 25, 2022
  7. timrogers commented on Oct 25, 2022

    @timrogers
    ContributorAuthor

    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.

  8. dylan-smith commented on Oct 25, 2022

    @dylan-smith

    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.

  9. timrogers commented on Oct 25, 2022

    @timrogers
    ContributorAuthor

    Agreed on (2) as well - as @dylan-smith said - for the "upgrading a single extension" case.

  10. mislav commented on Oct 25, 2022

    @mislav
    Contributor

    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.

  11. timrogers commented on Oct 25, 2022

    @timrogers
    ContributorAuthor

    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!

  12. added
    gh-extension
    on Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgh-extension

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions