CircleCI-Public / circleci-cli

Use CircleCI from the command line
https://circleci-public.github.io/circleci-cli/
MIT License
407 stars 232 forks source link

[DEVEX-1216] context commands can now be used with `--org-id` parameter. #1046

Closed JulesFaucherre closed 7 months ago

JulesFaucherre commented 7 months ago

Jira ticket

Changes

Rationale

Having these commands use the --org-id parameter was necessary to support standalone projects.

Considerations

The context API had to be adapted to handle using orgID instead of vcsType / orgName. A first approach was already implemented for CreateContext. The solution taken here was to add a method CreateContextWithOrgID. After some reflexion, we thought that duplicating every call of the interface would not be very clear and would pass the decision of whether to use orgID or vcsType / orgName to the caller. Thus we decided to unite the interface into one that would be instantiated with the information about its org.

Screenshots

N/A.