danochoa
8390b4154b
rearrange struct vals for consistency
2024-12-30 18:18:50 -06:00
danochoa
8f19d3b102
add gist delete tests for blank gist id
2024-12-30 17:24:10 -06:00
danochoa
049332d844
gh gist delete: prompt for gist id
2024-12-30 15:41:18 -06:00
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
ChandranshuRao14
29371e9491
Extract logic into helper function
2024-12-26 22:52:32 -05:00
Arseni Dziamidchyk
f9767d0a9a
add pending status for workflow runs
2024-12-26 19:10:06 +03:00
ChandranshuRao14
a542011cdc
Feat: Allow setting security_and_analysis settings in gh repo edit
2024-12-24 12:59:42 -06: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
73cd38ac07
update verify output table
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-12-19 12:47:55 -07:00
Meredith Lancaster
ce6150d136
simplify func params
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-12-19 07:18:01 -07: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
ab4912ff48
fix failing tests
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-12-16 12:40:13 -07:00
Meredith Lancaster
e4431a3f55
add mock http client
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-12-16 12:22:20 -07:00
Meredith Lancaster
fb020f2a79
update error messages
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-12-16 12:13:22 -07:00
Meredith Lancaster
8f5d7100f5
var naming
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-12-16 12:02:52 -07:00
Meredith Lancaster
6b95175363
add httpClient field to LiveClient struct
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-12-16 11:57:45 -07:00
Meredith Lancaster
e51b4efaa9
remove unused method
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-12-16 11:50:46 -07:00
Meredith Lancaster
5a6a7968a3
fetch bundles with sas url
...
Signed-off-by: Meredith Lancaster <malancas@github.com>
2024-12-16 11:25:43 -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
nilvng
3987f4af4a
chore: remove unused file
2024-12-15 18:08:45 +11:00
nilvng
55598d0a2c
feat: integrate new PRLister into pr list command
2024-12-15 18:04:51 +11:00
nilvng
91b3b99b76
issue #2329 : create shared PRLister
2024-12-15 17:53:00 +11:00
nilvng
d7cabf18f7
fix: tab format may break checkout prompts
2024-12-15 13:55:47 +11:00
nilvng
1f525bf175
issue #2329 : handle empty list of PR
2024-12-15 12:34:46 +11: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