-
Notifications
You must be signed in to change notification settings - Fork 116
fix(bitbucket-cloud): assign unique statue name in Bitbucket Cloud #2352
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
base: main
Are you sure you want to change the base?
fix(bitbucket-cloud): assign unique statue name in Bitbucket Cloud #2352
Conversation
Summary of ChangesHello @zakisk, 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 an issue in the Bitbucket Cloud integration where commit statuses were not uniquely identified per PipelineRun. By implementing a dynamic key generation mechanism, the system can now report distinct statuses for individual PipelineRuns, improving clarity and preventing conflicts in the Bitbucket UI. 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
|
🔍 PR Lint Feedback
|
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 addresses an issue with non-unique commit status names in Bitbucket Cloud by incorporating the PipelineRun name into the status key. The change correctly utilizes the provider.GetCheckName helper function for this purpose. The implementation is sound, and the accompanying test updates are appropriate. I've included one suggestion to enhance the test coverage by parameterizing it for custom application names, which would increase the robustness of the test suite. Overall, this is a solid fix.
Update Bitbucket Cloud provider to use GetCheckName helper for commit status key. This enables unique status reporting per PipelineRun by using the format "ApplicationName / PipelineRunName" instead of just the application name. Changes: - Replace hardcoded ApplicationName with GetCheckName in CreateStatus - Update tests to include OriginalPipelineRunName in StatusOpts - Add assertion in MuxCreateCommitstatus to verify correct key format Fixes: openshift-pipelines#2237 JIRA: https://issues.redhat.com/browse/SRVKP-9636 Signed-off-by: Zaki Shaikh <[email protected]>
4f216be to
d1a3a5d
Compare
|
/gemini review |
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 centralizes the generation of the Bitbucket Cloud commit status key by introducing a new provider.GetCheckName function. Previously, the key was directly derived from v.pacInfo.ApplicationName. The change in pkg/provider/bitbucketcloud/bitbucket.go updates the CreateStatus function to use this new helper. Correspondingly, the test suite in pkg/provider/bitbucketcloud/bitbucket_test.go and pkg/provider/bitbucketcloud/test/bbcloudtest.go has been updated to reflect and verify this change. This includes adding OriginalPipelineRunName to test status options, introducing a new test case for applicationName, dynamically setting the application name in tests, and modifying the MuxCreateCommitstatus helper to accept and assert against the applicationName when validating the generated commit status key.
Update Bitbucket Cloud provider to use GetCheckName helper for commit status key. This enables unique status reporting per PipelineRun by using the format "ApplicationName / PipelineRunName" instead of just the application name.
Changes:
Fixes: #2337
📝 Description of the Change
👨🏻 Linked Jira
https://issues.redhat.com/browse/SRVKP-9636
🚀 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-bytrailer 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.shto automatically addthese co-author trailers to your commits.
✅ Submitter Checklist
fix:,feat:) matches the "Type of Change" I selected above.make testandmake lintlocally to check for and fix anyissues. For an efficient workflow, I have considered installing
pre-commit and running
pre-commit installtoautomate these checks.