Refactor of the context API so that it can use either orgID or vcsType / orgName to reference an org. The information is passed upon creation of the context API client.
Allow all commands of circleci context to use the --org-id.
Commands circleci context store-secret, circleci context remove-secret, circleci context create and circleci context delete show a text line upon success to inform user.
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.
Jira ticket
Changes
orgID
orvcsType / orgName
to reference an org. The information is passed upon creation of the context API client.circleci context
to use the--org-id
.circleci context store-secret
,circleci context remove-secret
,circleci context create
andcircleci context delete
show a text line upon success to inform user.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 ofvcsType / orgName
. A first approach was already implemented forCreateContext
. The solution taken here was to add a methodCreateContextWithOrgID
. 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 useorgID
orvcsType / 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.