Commit graph

77 commits

Author SHA1 Message Date
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
Sam Coe
cacff4ad6d
Use go-gh config package (#5771) 2022-06-23 11:50:04 +00:00
Greggory Rothmeier
9ea548107c Allow working with Codespaces repo secrets
The API exists for this, so we can allow it through the CLI

https://docs.github.com/en/rest/codespaces/repository-secrets
2022-06-15 13:41:42 -07:00
Josh Soref
104d7655d7
Support and favor delete for secrets (#5617)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-05-16 12:24:05 +00:00
Sam Coe
d244346960
Replace uses of strings.Title (#5623) 2022-05-12 13:52:21 +00:00
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +02:00
Roshan Padaki
13342cb272
Don't error on list commands when no results found (#5479)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-04-25 17:55:52 +00:00
Josh Gross
31c6ba3807
Support listing and removing Dependabot secrets (#5160)
* Support listing and removing Dependabot secrets

* Remove duplicated tests
2022-03-17 11:42:12 +02:00
Josh Gross
f6d2f83938
Support setting Dependabot secrets (#5134)
* Support setting Dependabot secrets

* lint: Remove unnecessary assignment

* Use `StringEnumFlag` helper for Application input

* Add Dependabot to command description

* Move repository name mapping after input validation

* Error when multiple secret entities are set

* Return an error for invalid apps

* Use `assert` instead of `require`
2022-03-15 07:44:51 +02:00
Mislav Marohnić
19563c4a74 Use StringEnumFlag helper in more places 2022-02-18 12:52:47 +01:00
Christian Gregg
c5dbf20ed4
Alias list as ls for all commands (#5214)
I always get tripped up whenever trying to list my codespaces, adding
`ls` as an alias to `list` feels natural enough.

Co-authored-by: Mislav Marohnić <mislav@github.com>
2022-02-17 13:53:42 +01:00
Mislav Marohnić
4a3ef50d2d
Standardize pager output across commands (#5141)
Add pager functionality to the following commands:
- gist list
- pr checks
- release list
- run list
- run view
- secret list
- workflow list
- workflow view

Additionally, normalize error handling when starting the pager has
failed: only print a non-fatal notice to stderr instead of aborting the
whole command.
2022-02-01 08:36:51 +01:00
Sam Coe
3be4b9951d
Trim leading and trailing whitespace when setting secrets from stdin (#5086)
* Trim leading and trailing whitespace when setting secrets from stdin

* Only trim newline at end of string
2022-01-29 09:32:14 +02:00
Mislav Marohnić
e43cb2b880 Port more legacy stubs to the new ask stubber 2022-01-14 19:34:15 +01:00
Mislav Marohnić
95a71f75c5 Improve setting multiple secrets
- Store multiple secrets in parallel
- Perform repo ID resolution in parallel with looking up the encryption key
- Avoid resolving repo IDs more than once
- Allow passing `--env-file=-` to read from stdin
- Fix storing user secrets from file
2021-12-20 23:35:31 +01:00
lpessoa
5589583e4d Adding set secrets from env files
Allows to set multiple secrets from an env file.

    gh secret set -f secrets.env

The env file follows a simple format as defined in https://github.com/joho/godotenv

    SPAM=eggs
    FOO="bar"
2021-12-20 23:33:54 +01:00
Sergio Guzmán Mayorga
f13f0e7d87
Add secret set --no-store to print the encrypted secret (#4423)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-12-02 16:05:10 +00:00
Josh Gross
e82958b4e0
Support setting user Codespaces secrets (#4699)
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-11-18 12:55:24 +01:00
Josh Gross
577f29ae0d
Support listing and removing user Codespaces secrets (#4714) 2021-11-18 12:53:35 +01:00
Mislav Marohnić
42c8ce91d0 Group gh secret as an Actions command 2021-11-03 15:51:19 +01:00
Alan Donovan
f4491c7a80 Add FlagErrorf; encapsulate FlagError.error 2021-10-21 11:40:20 -04:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Robin Neatherway
0e51ec1699 Correct benign mistake in off-by-one guard
m[2] is the third element of m, rather than the second, so we have to
check instead that the len of m is at least 3.

Because the regular expression has two capture groups, the length of m
will always be 3, so currently the guard will always be true.
2021-08-19 14:41:04 +01:00
Mislav Marohnić
90b7886142 Fix unmarshalling GraphQL error type
The "path" field of a GraphQL error object contains a mix of strings and
numbers and cannot be deserialized into `[]string`. Fortunately, we
don't need to rely on the "path" field and instead have the final error
message be constructed by aggregating human-readable "message" fields.
2021-08-04 15:34:53 +02:00
Mislav Marohnić
3a7ce3a440 Fix setting environment secrets
This uses the correct public key when setting environment secrets.
https://docs.github.com/en/rest/reference/actions#get-an-environment-public-key
2021-06-14 11:51:20 +02:00
Bruno Alla
051520afe1 Add a long command description for secrets remove 2021-06-04 16:44:44 +01:00
Bruno Alla
4d46447eb3 Fix description for gh secret set --env option 2021-06-04 15:29:01 +01:00
Bruno Alla
4b79edf603 Add support for removing environment secrets 2021-06-03 08:51:39 +01:00
vilmibm
0931531e2f collapse conditional 2021-06-02 13:27:19 -05:00