Commit graph

47 commits

Author SHA1 Message Date
Yukai Chou
1ac1609bb7 Use "GitHub Actions" as a whole 2023-11-23 07:20:11 +08:00
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
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
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
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
Håvard Anda Estensen
58cb773e09
Replace ioutil with io and os (#5498) 2022-04-26 13:07:44 +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
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
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
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
4d46447eb3 Fix description for gh secret set --env option 2021-06-04 15:29:01 +01:00
vilmibm
0931531e2f collapse conditional 2021-06-02 13:27:19 -05:00
Bruno Alla
32856c987d Add ability to set environments secrets 2021-06-02 15:56:33 +01:00
vilmibm
3e36596269 ability to paste secrets in a prompt 2021-04-23 13:07:20 -05:00
Sam
9ec1e21d4c
Default to GHES host if only GHES is authenticated (#3286) 2021-03-30 16:51:00 +02:00
Nate Smith
e9afac9373
Merge pull request #2844 from cli/secret-set-fix
Fix `secret set --repos` for repositories that have dashes
2021-01-25 11:34:59 -08:00
Mislav Marohnić
f46bab256c Rename to SuccessIconWithColor 2021-01-25 14:56:39 +01:00
Mislav Marohnić
f8135c15b1 Fix secret set --repos for repositories that have dashes
A GraphQL alias cannot contain dashes. Instead, generate safe
identifiers for GraphQL aliases.
2021-01-25 14:29:11 +01:00
Mislav Marohnić
23d68705bc Match color of the success icon with the end state of the record 2021-01-22 23:55:33 +01:00
vilmibm
352cde0563 do not process filename arguments 2020-12-14 10:44:26 -08:00
vilmibm
a5a043c5a5 automatically set vis when just -r passed 2020-12-10 15:24:09 -08:00
vilmibm
3306351162 use type for Visibility 2020-12-10 15:11:08 -08:00
vilmibm
e1e838c281 more explicit success message 2020-12-10 15:04:56 -08:00
vilmibm
408d5c6d96 no space in usage placeholder 2020-12-10 13:23:35 -08:00
vilmibm
4e8a680575 remove implied org functionality from secret set 2020-12-10 13:22:11 -08:00
vilmibm
2248565839 print success messages 2020-12-09 17:37:13 -08:00
vilmibm
dbff17e6ed add removing secrets 2020-12-09 17:37:13 -08:00
vilmibm
486aa81dfe validate secret name 2020-12-09 15:32:02 -08:00
vilmibm
40c4007d98 rename create->set 2020-12-07 15:01:55 -08:00