ferhat elmas
70470f9cef
refactor: drop multierror in favor of std
...
Drop github.com/hashicorp/go-multierror
in favor of https://pkg.go.dev/errors#Join (go1.20).
Related to #11468
Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
2025-12-02 15:08:58 +01:00
William Martin
502b64582d
Support --no-repos-selected on secret set
2025-07-03 17:02:28 +02:00
William Martin
db8b38a185
Fix secret command panic when base repo from cwd
2025-03-06 11:45:22 +01:00
Andy Feller
23ea61d325
Expand gh secret base repo tests
...
Building on top of the work done in commands to account for GH_REPO environment variable, this commit expands existing tests around handling base repo functions to include new test scenarios.
These tests fail in the same way as reported on the issue when run against `trunk` without the other branch's changes, demonstrating they will help avoid regression.
2025-03-04 13:39:38 -05:00
Azeem Sajid
d67d65e304
[gh secret] Check GH_REPO too in addition to --repo for disambiguation
2025-03-04 18:36:53 +01:00
William Martin
e7ffb1e435
Fix typo in secret base repo selection comment
2025-01-15 14:55:18 +01:00
William Martin
88a64d2a11
Change wording on secret repo prompt
2025-01-15 14:55:17 +01:00
William Martin
b382b24728
Print informative message before prompting for secret repo
2025-01-15 14:55:17 +01:00
William Martin
a47327aee6
Secret base repo prompting should not use resolved remote
...
This is because the secret commands don't use the SmartBaseRepo behaviour, and therefore
don't care about the resolved remote.
2025-01-15 14:55:17 +01:00
William Martin
ce47fabc27
Move secret base repo prompting earlier
2025-01-15 14:55:17 +01:00
William Martin
d831e3e1db
Remove validated TODO and add review warning
2025-01-15 14:55:17 +01:00
William Martin
4da4c82090
Rename secret BaseRepo func
2025-01-15 14:55:17 +01:00
William Martin
870da79886
Use smarter base repo funcs for secret commands
2025-01-15 14:55:17 +01:00
William Martin
73244c010e
Move secret repo validation into secrets subpackage
2025-01-15 14:55:17 +01:00
William Martin
df8bb51c9c
Always prompt on secret set when multiple remotes
2025-01-15 14:55:17 +01:00
Wing
3de2fd94b3
Prompt for secret commands
...
Co-authored-by: William Martin <williammartin@github.com>
2025-01-15 14:55:16 +01:00
Wing
57c9ee0ad2
Add tests for secret commands
...
Co-authored-by: William Martin <williammartin@github.com>
2025-01-15 14:55:16 +01:00
Wing
88988374b5
Add remote check to secret commands
...
Co-authored-by: William Martin <williammartin@github.com>
2025-01-15 14:55:16 +01:00
Andy Feller
c088951944
Fix host handling in variable and secret delete
...
This change updates `gh variable delete` and `gh secret delete` to use the host associated with the repository rather than the default host. Along with these changes is minor refactoring of the tests to ensure appropriate Dotcom vs GHES targeting works as expected.
Minor edit to `gh variable get` testing to simplify some conditional logic in test setup.
2024-08-02 15:11:22 -04:00
William Martin
1d38230675
Move config interfaces into gh package ( #9060 )
2024-05-10 10:39:36 +02:00
Viktor Szépe
6d9dd57774
Fix typos
2024-05-09 20:15:27 +00:00
Nero Blackstone​
93113e12ea
Add colon at the end of secret prompts ( #9004 )
2024-04-26 12:58:45 +02:00
Babak K. Shandiz
d034a69164
Add comment to explain showSelectedReposInfo assignment
...
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-04-04 20:09:28 +01:00
Babak K. Shandiz
4aa7e75cd1
Rename const to avoid CodeQL error
...
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-04-04 20:06:45 +01:00
Babak K. Shandiz
d8ff343d5c
Add tests to verify numSelectedRepos is populated when necessary
...
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-04-04 19:49:34 +01:00
Babak K. Shandiz
e42b8b7e6b
Populate numSelectedRepos only if needed
...
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-04-04 19:48:44 +01:00
Babak K. Shandiz
d687bc7908
Add test cases to verify exported JSON has non-zero numSelectedRepos
...
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-04-01 22:08:18 +01:00
Babak K. Shandiz
148f9527c1
Populate numSelectedRepos in non-interactive mode, if explicitly selected
...
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-04-01 22:07:53 +01:00
w1mvy
9dd5805f9c
Add json export flags to variable list command ( #8516 )
2024-01-17 10:09:09 -08:00
Yukai Chou
1ac1609bb7
Use "GitHub Actions" as a whole
2023-11-23 07:20:11 +08:00
Yukai Chou
21bf1babdf
Proof-reading
2023-11-17 02:04:35 +08:00
Heath Stewart
7738b6187c
Add headers to all tables ( #8157 )
2023-10-20 11:20:02 +02:00
rajhawaldar
79296c0a62
Use camelCase for fields
...
Signed-off-by: rajhawaldar <rajhawaldar.in@gmail.com>
2023-09-29 13:02:59 +05:30
rajhawaldar
965eabd503
Support standard output format flags for secret and deploy-key list
...
Signed-off-by: rajhawaldar <rajhawaldar.in@gmail.com>
2023-09-25 21:35:47 +05:30
Nate Smith
fc73c16fe8
use prompter in secret set
2023-08-16 21:26:57 -05:00
Michael Bianco
c5b642fc5f
docs: example of setting multiple vars using stdin
2023-07-10 11:37:41 -06:00
Sam Coe
41a457136e
Tech debt cleanup for variable and secret commands ( #7151 )
2023-03-15 01:03:56 +00:00
Anupam Kumar
88cc4d2531
Add variable set command ( #6928 )
2023-03-13 03:01:38 +00:00
Sam Coe
c9a2d85793
Cleanup config.AuthToken and config.DefaultHost methods ( #7049 )
2023-02-28 00:24:45 +00:00
Sam Coe
1233bd4439
Special case setting dependabot org secrets ( #6941 )
2023-02-02 07:12:22 +11:00
Josh Gross
f6431ca001
Use int64 repository IDs for Codespaces user secrets
2023-01-27 14:36:35 -05:00
vilmibm
f5d19b831e
error instead of prompt when no base repo + fixes
2022-12-15 11:44:37 -08:00
Mislav Marohnić
3fe5026d39
Migrate to tableprinter from go-gh ( #6346 )
2022-10-17 15:15:39 +02:00
Ashwin Jeyaseelan
b47ed57694
Revert "Revert "Added functionality for org-level codespaces secrets ( #6171 )" ( #6223 )"
...
This reverts commit eaabd35b76 .
2022-09-15 15:53:28 -07:00
Sam Coe
e7102f9d84
Migrate to go-gh text package ( #6236 )
2022-09-14 09:23:55 +04:00
Ashwin Jeyaseelan
eaabd35b76
Revert "Added functionality for org-level codespaces secrets ( #6171 )" ( #6223 )
...
This reverts commit bde64b3191 .
2022-09-09 08:18:03 +04:00
Ashwin Jeyaseelan
bde64b3191
Added functionality for org-level codespaces secrets ( #6171 )
2022-09-08 09:40:53 +04:00
vilmibm
41385477c3
fix linting
2022-07-27 14:15:27 -05:00
vilmibm
d5334f4115
Revert "update linter checks"
...
This reverts commit 40ecb8c188 .
2022-07-27 13:30:41 -05:00
vilmibm
40ecb8c188
update linter checks
2022-07-26 16:06:52 -05:00