Commit graph

4116 commits

Author SHA1 Message Date
Michael Hoffman
fa254ba205 Complete get -> list renaming 2024-12-28 07:51:47 -05:00
Michael Hoffman
da826db342 Better error testing for autolink TestListRun 2024-12-27 22:58:12 -05:00
Michael Hoffman
20f086549a Decode instead of unmarshal 2024-12-27 22:03:25 -05:00
Michael Hoffman
63488a1a06 Use 'list' instead of 'get' for autolink list type and method 2024-12-27 22:02:19 -05:00
Michael Hoffman
dc6320f7f7 Remove NewAutolinkClient 2024-12-27 21:47:27 -05:00
Michael Hoffman
cc24289832 Break out autolink list json fields test 2024-12-27 21:43:47 -05:00
Michael Hoffman
67266e9cb8 PR nits 2024-12-27 21:40:52 -05:00
Michael Hoffman
e98ff2ea38 Refactor autolink subcommands into their own packages 2024-12-27 21:36:16 -05:00
Michael Hoffman
ea04d2da30 Whitespace 2024-12-27 21:36:16 -05:00
Michael Hoffman
869d25193a Refactor out early return in test code
Co-authored-by: Tyler McGoffin <jtmcg@github.com>
2024-12-27 21:36:16 -05:00
Tyler McGoffin
4a74cc8856 Add testing for AutoLinkGetter
This adds the missing mocked http tests to the http_test.go file. These
tests were previously bundled with the tests in list_test.go, creating a
testing pattern that was difficult to understand and maintain. The
refactor in the previous commit replaced these tests with the
AutolinkClient interface, allowing for the httpmocks to be isolated to the
AutolinkGetter that implements that interface.
2024-12-27 21:36:16 -05:00
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
Tyler McGoffin
5fb98524e0 Apply PR comment changes 2024-12-27 21:36:16 -05:00
Michael Hoffman
23c16c9c4c Introduce repo autolinks list commands 2024-12-27 21:36:16 -05:00
Arseni Dziamidchyk
f9767d0a9a add pending status for workflow runs 2024-12-26 19:10:06 +03:00
Tyler McGoffin
7357bad2d3
Merge pull request #10112 from heaths/gh-merge-base-docs
Document how to set gh-merge-base
2024-12-23 11:51:10 -08:00
William Martin
b9c597458b Document SmartBaseRepoFunc 2024-12-23 19:07:17 +01:00
William Martin
7a954cde82 Document BaseRepoFunc 2024-12-23 19:07:17 +01:00
Heath Stewart
78836097c3
Document how to set gh-merge-base
Follow-up to PR #9712
2024-12-20 10:49:38 -08:00
Meredith Lancaster
3542b3566a add test for different SAN and SourceRepositoryURI values
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-12-18 07:24:44 -07:00
Meredith Lancaster
4431fa9d8f add test for signerRepo and tenant
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-12-18 06:55:00 -07:00
Meredith Lancaster
86b815e9bf add some more fields to test that san, sanregex are set properly
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-12-18 06:49:08 -07:00
Meredith Lancaster
83770d8e55 update san and sanregex configuration for readability
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-12-16 18:42:29 -07:00
Meredith Lancaster
9acd0c7e06 Merge branch 'consolidate-verify-policy-options-config' of github.com:malancas/cli into consolidate-verify-policy-options-config 2024-12-16 17:06:41 -07:00
Meredith Lancaster
1df2976e81 reduce duplication when creating policy content
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-12-16 17:06:36 -07:00
Meredith Lancaster
08f6e2f943
Merge branch 'trunk' into consolidate-verify-policy-options-config 2024-12-16 08:08:09 -07:00
Meredith Lancaster
64bf37e31c
Merge pull request #10051 from malancas/gh-attestation-download-windows-bug
Use Windows compatible file name for downloaded attestations when running `gh attestation download`
2024-12-16 08:01:36 -07:00
Meredith Lancaster
90f5dae82b Merge branch 'trunk' into consolidate-verify-policy-options-config 2024-12-13 15:23:01 -07:00
Meredith Lancaster
9b905d9f18
Merge pull request #9891 from malancas/print-policy-info 2024-12-13 15:14:05 -07:00
Phill MV
dd95e5a863 tweak output of build policy info 2024-12-13 15:55:49 -05:00
Kynan Ware
b3f74900f2
Merge pull request #10078 from cli/10077-gh-pr-view-cannot-find-pr-from-branch-when-fork-is-in-the-same-org-as-upstream
Support `pr view` for intra-org forks
2024-12-13 11:44:43 -07:00
Phill MV
c789b56da4
Merge pull request #9954 from cli/phillmv/improve-gh-at-inspect 2024-12-13 09:50:52 -05:00
William Martin
d662226ae4 Name conditionals in PR finder 2024-12-13 14:33:33 +01:00
William Martin
96ac8d6a2f Support pr view for intra-org forks 2024-12-13 14:27:41 +01:00
Kynan Ware
c35d725b0b
Merge pull request #10074 from cli/kw/cli-7011-fix-delete-branch-with-merge-queue-v2
`gh pr merge --delete-branch` exits with error when merge requested via merge queue
2024-12-12 16:05:06 -07:00
Kynan Ware
253b082600 Return err instead of silentError in merge queue check 2024-12-12 15:54:01 -07:00
Meredith Lancaster
76ffe4fb28
Merge pull request #9999 from malancas/sigstore-verifier-cleanup
Sigstore verifier logic updates
2024-12-12 15:10:52 -07:00
Phill MV
cae97c9da8 linting pointed out this var is no longer used 2024-12-12 17:00:02 -05:00
Phill MV
75cbdc0d04 Removed fun, but inaccessible ASCII header 2024-12-12 16:58:26 -05:00
Phill MV
85f9cfdccb further tweaks to the long description 2024-12-12 16:56:02 -05:00
Kynan Ware
439cfa08bb Exit on pr merge with -d and merge queue
When running `gh pr merge -d` on a repo with a merge queue policy, exit before attempting to merge.
2024-12-12 14:49:38 -07:00
Phill MV
94943eac10 Merge branch 'phillmv/improve-gh-at-inspect' of github.com:cli/cli into phillmv/improve-gh-at-inspect 2024-12-12 16:47:11 -05:00
Phill MV
94525f83f6 Addressed PR review feedback; expanded Long command help string, used ghrepo, clarified some abbreviations 2024-12-12 16:46:58 -05:00
Phill MV
e7f3d739ba
Update pkg/cmd/attestation/inspect/inspect.go
Co-authored-by: Andy Feller <andyfeller@github.com>
2024-12-12 16:20:56 -05:00
Andy Feller
5e9283c70c
Merge pull request #10026 from ankddev/better-document-auth-scopes
docs: better document auth scopes
2024-12-12 11:16:14 -05:00
Andy Feller
4f32282f93 Update gh auth commands to point to GitHub Docs
After initial discussion with core maintainers, it didn't seem prudent to duplicate the GitHub Docs information on OAuth scopes within the GitHub CLI codebase.

Instead, this commit updates help usage information in relevant commands on the page within GitHub Docs for more information.
2024-12-12 11:03:57 -05:00
Kynan Ware
e2422b7e7e
Merge pull request #9933 from cli/kw/improve-ext-installation-no-executable-error
Improve documentation and error messaging for local extension installations without executables
2024-12-12 07:08:16 -07: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