cli
cli copied to clipboard
[FEATURE] heroku pipeline:config:edit
Hi, with the new version of heroku review apps, the ENV vars are set in their own interface and not anymore in the app they inherit.
I'm maybe wrong, but there is no way to configure theses env vars in cli for now.
If think the exact config behavior could be added in the pipeline topic.
Thanks.
+1 for this.
Beyond the CLI, at the very least starting with the (old) parent app's config would be a much better experience.
However as it stands, after upgrading I was immediately left needing to enter 60+ environment variables and very surprised to find there is no way to set them via the CLI.
FWIW I tend to use heroku config:set
rather than heroku config:edit
, so equivalently heroku pipelines:config:set
would be the command I'm after!
After investigating this a bit further, it seems like the relevant endpoint does exist in the Platform API, so it's just the CLI where it is omitted / not yet implemented.
In the meantime, for anyone wanting to update multiple config variables at once and/or update config variable from the command line, you can do it with a command like the below (note that the stage is "review" and the pipeline must be referenced by ID and not name):
$ curl -n -X PATCH https://api.heroku.com/pipelines/$PIPELINE_ID/stage/review/config-vars \
-d '{
"FOO": "bar",
"BAZ": "qux"
}' \
-H "Content-Type: application/json" \
-H "Accept: application/vnd.heroku+json; version=3"
Source: https://devcenter.heroku.com/articles/platform-api-reference#pipeline-config-vars-update
Would an external PR implementing this feature be reviewed/accepted?