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

fix: updates how the context name is chosen when adding new contexts.… #58

Conversation

scottnemes
Copy link
Contributor

…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:

  • you included tests
  • you linted your code
  • your PR has appropriate, atomic commits (interactive rebase!)
  • your commit message follows Conventional Commit format
  • you are not reducing the total test coverage

…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 particledecay#43).
…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 particledecay#43).
…m:scottnemes/kconf into issue-43-fix-add-multiple-contexts-rename
@scottnemes scottnemes changed the base branch from main to add_codeclimate November 15, 2023 17:44
@scottnemes scottnemes changed the base branch from add_codeclimate to main November 15, 2023 17:44
@particledecay particledecay merged commit 840bc06 into particledecay:main Nov 16, 2023
@particledecay
Copy link
Owner

Merging this in, thanks for the PR!

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

Successfully merging this pull request may close these issues.

Adding files with multiple contexts forces renaming
2 participants