Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide default organization for --org-id in the config file #832

Open
canatella opened this issue Jan 26, 2023 · 3 comments
Open

Provide default organization for --org-id in the config file #832

canatella opened this issue Jan 26, 2023 · 3 comments
Assignees

Comments

@canatella
Copy link

What problem does this feature solve?:

With private orbs, the --org-id argument is mandatory for multiple circleci cli commands, most annoyingly the validate one. Being able to configure a default value in the ~/.circleci/cli.yml config file would be nice.

Provide an example:

~/.circleci/cli.yml

host: https://circleci.com
...
default_org_id: "12345678-1234-1234-1234-123412345678"
@jasonarewhy
Copy link

Agreed, we should be able to configure this in the cli.yml and/or with a CIRCLECI_CLI_ORG_IDenvironment variable.

@jasonarewhy
Copy link

From the code, it appears --org-id is actually optional, so long as you are using --org-slug.

We used to be able to use the org slug only but found that recently we had to begin using org-id instead. However, it seems that CircleCI (silently?) renamed org slugs from github/<org name> to gh/<org name>. So our docs on using --org-slug were no longer valid.

When I hit the API me/collaborations endpoint to get a list of orgs, I was able to see the correct org slug with the gh/ prefix.

Hope this helps others frustrated by having to use the non-human-friendly org-id.

@JulesFaucherre
Copy link
Contributor

Hello!
@canatella Definitely, thanks for the suggestion, we will consider this and let you know
@jasonarewhy The suggestion for env variable could be interesting, we'll look into this. Regarding your --org-slug problem , you're completely right, we introduced this problem by migrating the config validation to a new route. This should be fixed by this pr so you should not have the problem anymore. Tell us if you still have it

@JulesFaucherre JulesFaucherre self-assigned this May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants