Commit graph

231 commits

Author SHA1 Message Date
travellertales
e40c592e42
Update command.go 2026-04-27 10:19:56 -04:00
Kynan Ware
3e0305d941 Disable auth check for gh extension install
Allow installing extensions without being authenticated. The install
command can work with public repositories and local directories without
requiring a login, so the auth gate is unnecessary.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-15 17:55:45 -06:00
Copilot
ff8873da07
Fix extension install error message showing raw struct instead of owner/repo (#12836)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: williammartin <1611510+williammartin@users.noreply.github.com>
2026-03-05 12:28:54 +01:00
fchimpan
5761a1e669
Update actions/checkout to v6 in extension workflow templates 2025-12-30 23:39:34 +09:00
Babak K. Shandiz
05986e4cb3
chore: apply go fix to remove deprecated // +build tags
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-10-30 21:10:45 +00:00
Babak K. Shandiz
188098d592
test(search): provide feature detection dependency
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 12:25:43 +01:00
Babak K. Shandiz
257f143711
fix(search): add feature detection dependency
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-08-31 12:24:05 +01:00
Andy Feller
313d20ba83 Ensure hostnames are visible in CLI website
This commit changes <github.com> and <ghe.com> references to `github.com` and `ghe.com` so they are visible on the GitHub CLI marketing website.

GitHub Pages will render URLs with a protocol as clickable links, however hostnames are treated as HTML elements and not rendered.
2025-07-14 08:33:20 -04:00
William Martin
49ed6c4681 Use t.Chdir in tests 2025-06-17 11:44:14 +02:00
Babak K. Shandiz
791e1af828
Add missing gc.AssertExpectations calls
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-10 14:09:49 +01:00
Babak K. Shandiz
f0d4acd501
Add tests for IsPinned method
Signed-off-by: Babak K. Shandiz <babakks@github.com>
2025-04-10 14:00:24 +01:00
Azeem Sajid
e02ee18ed2 [gh ext] Fix GitKind extension directory path 2025-03-15 17:55:29 +05:00
Andy Feller
f9d50d86ac
Merge pull request #10508 from iamazeem/10449-inconsistent-examples-format
Inconsistent format of examples in help text
2025-02-27 09:15:14 -05:00
Azeem Sajid
33c30d5bd1 Inconsistent format of examples in help text 2025-02-27 16:26:25 +05:00
Azeem Sajid
69fff52026
Inconsistent format of description of flags (starting with lowercase letter) (#10507) 2025-02-27 11:40:21 +01:00
Azeem Sajid
026f64ce6f Standardize URLs 2025-02-13 10:41:53 +05:00
Azeem Sajid
50e7b00327 Address review comments 2025-02-05 12:21:29 +05:00
Azeem Sajid
91c75596ee Address review comments 2025-02-05 12:14:39 +05:00
Azeem Sajid
3bc7b7e7e2 [gh extensions install] Improve help text and error message 2025-01-30 11:40:42 +05:00
Andy Feller
41e99b9eab
Merge pull request #9934 from cli/andyfeller/cli-cli-8183-timeout-pt2
Ensure extension update notices only notify once within 24 hours, provide ability to disable all extension update notices
2025-01-13 09:12:32 -05:00
Andy Feller
3ada5af872 Enhance help docs on ext upgrade notices
- update `gh help environment` to include that upgrade notices only happen when gh or extensions are executed
- update `gh ext --help` to include reference to upgrade notices and points to `gh help environment` for info on disabling
2025-01-13 08:41:10 -05:00
Andy Feller
0a1c9be656 Expand docs on cleaning extension update dir
This summarizes a conversation within cli/cli#9934 PR regarding how the new extension update directory metadata would affect gh if not cleaned up.
2025-01-10 14:57:10 -05:00
Andy Feller
97eb8a194e Simplifying cleanExtensionUpdateDir logic
This function was doing some unnecessary heavy lifting detecting if the directory being deleted actually existed when `os.RemoveAll()` would handle directories that exist or not.
2025-01-10 14:29:55 -05:00
nobe4
69b17272d6
fix: add back colon that I removed 2025-01-10 17:17:14 +01:00
nobe4
69ab0c9c85
fix: actually read how MaxFunc work and simplify the code 2025-01-10 16:31:13 +01:00
nobe4
1899b83509
fix: padded display
Apply code suggestion from @andyfeller from:
- https://github.com/cli/cli/pull/10194#discussion_r1909761552
- https://github.com/cli/cli/pull/10194#discussion_r1909764278
2025-01-10 16:28:50 +01:00
William Martin
889c4c75f3 Collapse dryrun checks in ext bin upgrade 2025-01-10 16:06:01 +01:00
nobe4
442be87acb
Merge branch 'trunk' into fancier-extention-upgrade 2025-01-07 12:04:35 +01:00
nobe4
3b69ea6fbc
feat: make the extension upgrade fancier
This left-pad the extension names during upgrade so they all align
nicely. It makes easier to see what is happening.
2025-01-07 12:01:02 +01:00
Josh Soref
dd32a9cc94 Upgrade generated workflows
Use `cli/gh-extension-precompile@v2`

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-01-05 23:18:28 -05:00
Andy Feller
edc0351c85 Fix failig local extension tests
Extensions have to be gh- prefixed and these newer tests were failing because of expectation.
2024-12-13 23:20:42 -05:00
Andy Feller
bfc63a14cc Implement remaining PR feedback
After merging in upstream changes regarding local extensions, this commit addresses remaining PR feedback while also bringing the newly merged tests into alignment with other changes.
2024-12-13 23:09:18 -05:00
Andy Feller
5ad6ccf73a Merge branch 'trunk' into andyfeller/cli-cli-8183-timeout-pt2 2024-12-13 22:53:13 -05:00
Andy Feller
c12e3694e8 Implement partial feedback before trunk update 2024-12-13 22:52:03 -05:00
William Martin
46862f96d9 Reformat ext install long 2024-12-12 14:57:34 +01:00
Kynan Ware
32abca8c38 Mention Windows quirk in ext install help text 2024-12-12 06:42:34 -07:00
Kynan Ware
3b93e28910 Fix error mishandling in local ext install 2024-12-12 06:40:37 -07:00
Kynan Ware
ec4b2dfe1b Assert on err msg directly in ext install tests 2024-12-12 06:38:04 -07:00
Kynan Ware
b9b60637b9 Clarify hosts in ext install help text 2024-12-12 06:35:13 -07:00
Andy Feller
c8501d82f2
Add build constraint for non-Windows systems 2024-12-11 22:27:59 -05:00
Andy Feller
56841d9cee
Add build constraint for non-Windows systems 2024-12-11 22:25:08 -05:00
Andy Feller
52b845bcad Refactor local installation manager test by OS
- Local extensions on Windows are not symlinks but files whose contents is the path to the local extension directory
- Local extensions elsewhere are symlinks
2024-12-10 22:13:48 -05:00
Andy Feller
a6b8bec70d Remove unnecessary Extension.FullName() 2024-12-08 21:17:26 -05:00
Andrew Feller
a55f50b115 Remove Extension.FullName() from interface
- this was something I did in the original implementation of this improved extension update notification logic
- discovering other parts of the extension manager code that were working with non-prefixed extension names motivated a different approach
- the extension manager code that requires the extension be prefixed has been enhanced to use the centralized ensurePrefixed() logic, making the need for this on the extension unnecessary
2024-12-08 20:01:26 -05:00
Andrew Feller
97630fe73c Enhance extension manager and tests
- extension manager has been made responsible for extension update directory information
- extension manager has been enhanced to ensure that previously left extension update metadata is deleted before installing an extension
- extension manager has been enhanced to ensure that extension update metadata is deleted when extension is being removed
- refactored extension command tests for manager change, ensuring previous and expected states along with returned release info
- refactored extension manager tests for ensuring previous extension update entries are removed before installing extension
- created extension manager test for installing local extension
- centralized logic for checking and ensuring extension name is "gh-" prefixed
2024-12-08 19:40:24 -05:00
Kynan Ware
b2ab7b84f8 Refactor extension executable error handling 2024-12-08 15:55:09 -07:00
Andrew Feller
6bd01d52dd Initial extension update check testing
First pass at implementing basic test around extension state checking behavior, wanting to discus with team about level of testing to perform and whether this is really the right place.
2024-12-01 18:20:55 -05:00
bagtoad
b5f3463b75 Improve error handling for missing executable
Check for executable file existence using os.IsNotExist for clearer error handling
2024-11-20 16:03:03 -07:00
bagtoad
e5eedefd09 Assert stderr is empty in manager_test.go 2024-11-19 16:42:16 -07:00
bagtoad
83c5bf3589 Update error message wording 2024-11-19 16:42:15 -07:00