You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@zhigang1992 Sorry, neither --field nor --raw-field accept JSON arrays right now. To pass a JSON array or a nested object, you will need to construct the JSON payload outside of gh and pass it in via --input. E.g.
jq -n '...'| gh api repos/orgs/repo/deployments --input -
We are open to potentially accepting JSON arrays in a future release, but I can't yet imagine what a possible syntax for that could be!
Reacted by Kyle, Benjamin Wuethrich, Eduardo Gutiérrez Silva, Shinse Tanaka and Eduardo Gutiérrez Silva
Why is this closed - I believe it is still a valid feature request to operate with the github deployments api - which is cumbersome right now
Reacted by Gordian Berger, Reid Beels, Thomas CARLI, Matt Wisner, Ryan Rampersad, Patrik Ragnarsson, Alexey Shokov, Andrew Dassonville, JB Mounier, James Qualls and 8 more
we would also love managing deployments via the gh-cli
Reacted by Ryan Rampersad, Patrik Ragnarsson, JB Mounier, Michal Jeczalik Jr, Dennis Schridde, Kyle King, Dávid Godzsák, Ted Behling and Greg Schofield
Activity
StefMa commentedon May 14, 2020
zhigang1992 commentedon May 15, 2020
zhigang1992 commentedon May 15, 2020
Our github action is setup to trigger
on: [deployment]and we usually use slack integration to do/github deploy orgs/repoBut something we need to pass extra params like
required_contexts, which doesn't work on slack, then we need to fallback to curl.It'd be really nice if we can do that with cli. 😄
@StefMa
mislav commentedon May 15, 2020
Hi @zhigang1992, is this something that you think the upcoming
gh apicommand would be a good fit for? #909Your curl command would become roughly:
But this would still be somewhat manual, since we didn't plan to add any specialized command to manage deployments anytime soon.
[-]Support `gh deploy create`[/-][+]Support `gh deployment create`[/+]zhigang1992 commentedon May 15, 2020
It's better than having to manually managing the tokens. 😄
If'd be even greater if we can somehow create alias?
mislav commentedon May 15, 2020
@zhigang1992 😉 #294 coming up soon on our roadmap!
vilmibm commentedon May 19, 2020
It sounds like we can close this as it's a usecase covered by the upcoming alias+api support <3
Please correct me if I'm wrong.
zhigang1992 commentedon Jul 7, 2020
sry to bother you guys again, 😭
how can I pass
"required_contexts": []with
-for--raw-fieldit won't accept
'[]'or\[\]mislav commentedon Jul 7, 2020
@zhigang1992 Sorry, neither
--fieldnor--raw-fieldaccept JSON arrays right now. To pass a JSON array or a nested object, you will need to construct the JSON payload outside of gh and pass it in via--input. E.g.We are open to potentially accepting JSON arrays in a future release, but I can't yet imagine what a possible syntax for that could be!
shouze commentedon Aug 25, 2020
Don't know if it can help but I've created https://github.com/inextensodigital/github some time ago, dedicated to deployments manipulations.
patrickjahns commentedon Jan 27, 2021
Why is this closed - I believe it is still a valid feature request to operate with the github deployments api - which is cumbersome right now
staabm commentedon Apr 19, 2021
we would also love managing deployments via the gh-cli
sbrudz-orum commentedon Jul 27, 2023
For anyone else struggling with this, the cli now supports it, but the syntax is:
-f required_contexts\[\]