Commit graph

32 commits

Author SHA1 Message Date
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
Bruno Alla
32856c987d Add ability to set environments secrets 2021-06-02 15:56:33 +01:00
Tyler Wright
e5bdaaab2c Add ability to list environment secrets
Co-authored-by: Mislav Marohnić <mislav@github.com>
2021-05-31 21:15:10 +02:00
Mislav Marohnić
260f720c07 💅 refactor and add tests for Secrets pagination 2021-05-31 20:40:53 +02:00
Gowtham Munukutla
cb60538709 paginate to get all secrets at once 2021-05-31 20:39:32 +02:00
vilmibm
3e36596269 ability to paste secrets in a prompt 2021-04-23 13:07:20 -05:00
Mislav Marohnić
ac348b0dec Fix requesting REST sub-resources on GHE
GitHub REST resources typically return full URLs to fetch related
resources at. We used to parse those URLs to find just the path portion
and pass that in to the `REST()` function, which only accepted paths. By
doing so, we are essential de-constructing a URL just to re-assemble it
again. While re-assembling it for Enterprise, though, we would
accidentally inject an extra `api/v3/` prefix where one was not needed.

The solution is just to use raw URLs as reported by the REST API with
no modifications. This extends the `REST()` function to accept full URLs
in addition to just paths to resources.
2021-04-19 12:41:09 +02: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ć
96fa6e7830 Merge remote-tracking branch 'origin' into success-icon-consistency 2021-01-22 23:56:54 +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
Mislav Marohnić
fc77cbc964 Deprecate test.ExpectLines
For asserting command output, exact string matches are preferred in most cases. In cases when a pattern match is needed, the test can use regexp ad hoc.
2021-01-18 23:25:45 +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
2e6639fe78 show number of selected repositories in secret list 2020-12-10 14:59:37 -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
1675bd9249 remove implied org functionality from secret remove
also fill in missing test cases >_>
2020-12-10 12:45:38 -08:00
vilmibm
c036e6699c remove implied org functionality from secret list 2020-12-10 12:36:57 -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
vilmibm
5309a2089a implement gh secret create and gh secret list 2020-12-04 16:47:23 -08:00