-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinggh-extensionrelating to the gh extension commandrelating to the gh extension commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
➜ gh ext install --pin 81a4ce86e027f31d306883c25a71b5d05b007e2e andyfeller/gh-sonar
⣷Cloning into '/Users/williammartin/.local/share/gh/extensions/gh-sonar'...
⢿remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (8/8), done.
⡿remote: Total 10 (delta 1), reused 7 (delta 1), pack-reused 0 (from 0)
Receiving objects: 100% (10/10), 6.64 KiB | 6.64 MiB/s, done.
Resolving deltas: 100% (1/1), done.
✓ Installed extension andyfeller/gh-sonar
✓ Pinned extension at 81a4ce86e027f31d306883c25a71b5d05b007e2e
This looks like it is pinned correctly. However...running gh ext list doesn't show it in blue (indicating pinned), and...
➜ gh ext upgrade gh-sonar --dry-run
[sonar]: would have upgraded from 81a4ce86 to 9977d8e5
✓ Successfully checked extension upgrades
Whereas a pinned extension would say:
➜ gh ext upgrade gh-sarif --dry-run
[sarif]: pinned extensions can not be upgraded
✓ Successfully checked extension upgrades
Separately, upgrading doesn't work at all, but that's another issue (to be created)
Acceptance Criteria
Given I installed a pinned, script-based GitHub CLI extension using gh ext install --pin SHA
When I execute gh ext upgrade <EXT> --dry-run
Then gh states pinned extensions can not be upgraded
Given I installed a pinned, script-based GitHub CLI extension using gh ext install --pin SHA
When I execute gh ext list
Then I see the extension sha is coloured cyan
In the following example, the version for gh-eco is colored cyan because it is a pinned extension:

iamazeem
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggh-extensionrelating to the gh extension commandrelating to the gh extension commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic