-
Notifications
You must be signed in to change notification settings - Fork 116
fix(cli): correct namespace flag binding in tkn-pac #2284
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(cli): correct namespace flag binding in tkn-pac #2284
Conversation
- The --namespace/-n flag was incorrectly bound to the same variable as --kubeconfig, causing namespace values to overwrite the kubeconfig path - Fixed template condition to display repos when count > 0 - Added tests for using kube flags with tkn-pac Jira: https://issues.redhat.com/browse/SRVKP-7152 Signed-off-by: Akshay Pant <[email protected]> Assisted-by: Claude-Sonnet-4.5 (via Cursor)
Summary of ChangesHello @theakshaypant, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical bug in the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly fixes a bug where the --namespace
flag was overwriting the --kubeconfig
value due to incorrect flag binding. The change to the template logic to display repositories is also correct. The addition of tests to cover the flag behavior is a great improvement. I've added one suggestion to make the new tests even more robust by ensuring a deterministic test environment and verifying default values.
- Set environment variables for HOME and KUBECONFIG in the test. - Updated test cases to use dynamic kubeconfig paths instead of hardcoded values. - Ensured that the expected configuration path reflects the changes in the test cases. This improves the flexibility and maintainability of the tests. Signed-off-by: Akshay Pant <[email protected]> Assisted-by: Gemini [email protected]
@theakshaypant we follow one commit for one fix/feature way, I've squashed it please keep in mind! |
📝 Description of the Change
Tested on local openshift cluster using latest pac and pipelines for issue reproduction

👨🏻 Linked Jira
https://issues.redhat.com/browse/SRVKP-7152
🔗 Linked GitHub Issue
N/A
🚀 Type of Change
fix:
)feat:
)feat!:
,fix!:
)docs:
)chore:
)refactor:
)enhance:
)deps:
)🧪 Testing Strategy
🤖 AI Assistance
If you have used AI assistance, please provide the following details:
Which LLM was used?
Extent of AI Assistance:
Important
If the majority of the code in this PR was generated by an AI, please add a
Co-authored-by
trailer to your commit message.For example:
Co-authored-by: Gemini [email protected]
Co-authored-by: ChatGPT [email protected]
Co-authored-by: Claude [email protected]
Co-authored-by: Cursor [email protected]
Co-authored-by: Copilot [email protected]
**💡You can use the script
./hack/add-llm-coauthor.sh
to automatically addthese co-author trailers to your commits.
✅ Submitter Checklist
fix:
,feat:
) matches the "Type of Change" I selected above.make test
andmake lint
locally to check for and fix anyissues. For an efficient workflow, I have considered installing
pre-commit and running
pre-commit install
toautomate these checks.