fix: updates how the context name is chosen when adding new contexts.… #58
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…Previously if more than one context was added, the first context would get the correct name but all additional contexts would be seen as duplicates of the first and renamed as such (refs #43).
What? (description)
If a context name is provided via the --context-name argument, all contexts added will use that name (myContext, myContext-1, etc.). If no context name is provided as an argument, then the context name from the config file provided will be used. If no context name is found in the config file, then a new name will be generated based on the cluster and user name used by the new context (i.e. myCluster-myUser).
Why? (reasoning)
Currently if you add multiple contexts at the same time and do not specify a name via the --context-name argument, only the first context will be added with the correct name.
Screenshots (if applicable)
N/A
GitHub Issue (if applicable)
[closes #43]
Acceptance
Check your PR for the following: