cli/pkg/cmd
Tyler McGoffin a390ce4f10 Refactor autolink list and test to use http interface for simpler testing
This defines an AutolinkClient interface with a Get method used for
fetching the autolinks lists from the api. Then, the http client for
autolinks implements this interface with the AutolinkGetter struct.

This allows for dependency injection of the AutolinkGetter struct into the
listOptions, enabling mocking of the AutolinkGetter for testing. The
result of this is simpler tests that are easier to maintain, because the
interface for the table tests now allow for defining autolink structs as
the response instead of large mocked api calls.

This also allows for bespoke testing of the http file, which I'll follow
up with in the next commit.
2024-12-27 21:36:16 -05:00
..
actions Additional formatting changes 2023-12-01 09:08:51 -05:00
alias Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
api Update documentation for gh api PATCH 2024-07-22 19:36:20 +01:00
attestation add test for different SAN and SourceRepositoryURI values 2024-12-18 07:24:44 -07:00
auth Update gh auth commands to point to GitHub Docs 2024-12-12 11:03:57 -05:00
browse docs: update description of command 2024-12-06 20:43:54 +03:00
cache Apply suggestions from code review 2024-11-21 13:55:35 -07:00
codespace fix: list branches in square brackets in gh codespace 2024-12-10 15:19:30 -05:00
completion Bump github.com/spf13/cobra from v1.4.0 to v1.5.0 (#6196) 2022-09-06 09:43:40 +04:00
config Add prefer_editor_prompt config 2024-07-09 21:01:50 +09:00
extension Reformat ext install long 2024-12-12 14:57:34 +01:00
factory Document SmartBaseRepoFunc 2024-12-23 19:07:17 +01:00
gist Merge pull request #9728 from heaths/issue9704 2024-10-15 16:26:13 -07:00
gpg-key Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
issue Merge changes from #10004 2024-12-08 20:34:21 -08:00
label Fix tests 2024-08-16 10:11:52 -07:00
org Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
pr Document how to set gh-merge-base 2024-12-20 10:49:38 -08:00
project Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
release Refactor error handling for missing "workflow" scope in createRelease 2024-11-23 16:59:49 -07:00
repo Refactor autolink list and test to use http interface for simpler testing 2024-12-27 21:36:16 -05:00
root Update gh auth commands to point to GitHub Docs 2024-12-12 11:03:57 -05:00
ruleset Use go-gh/auth package for IsEnterprise, IsTenancy, and NormalizeHostname 2024-10-15 11:56:43 -07:00
run add pending status for workflow runs 2024-12-26 19:10:06 +03:00
search Resolve PR feedback 2024-10-14 15:08:23 -07:00
secret Fix host handling in variable and secret delete 2024-08-02 15:11:22 -04:00
ssh-key Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
status Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
variable Merge branch 'trunk' into tab-indents 2024-08-06 13:08:48 -04:00
version Fix --version flag printing to stdout 2022-05-24 16:21:13 +02:00
workflow Fix tests 2024-08-16 10:11:52 -07:00