-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
Github comments are minimized even on different project keys #785
Comments
Noticed this as well for our monorepos. |
this drives me crazy as well 🙃 unfortunately it looks like comment's can't store metadata. so the simplest way forward would probably be to check the comment body for the project key. basically fetch the body through the GraphQL API and filter with a string include of
currently the comments are filtered here with the bot name. so it should be pretty straight forward to also add a filter with the project key in the body. Lines 137 to 141 in 895a89d
|
I just implemented some additional logic which should only minimize comments with the same project key. this still needs some testing. |
The Github decorator was not checking the project key listed against a summary comment so was minimising all summary comments when performing multiple decorations against a mono-repository. To overcome this, the contents of the summary comments are being retrieved and only the ones with a project key matching the current project are being minimised during decoration.
Released as part of 1.19.0 of the plugin (Sonarqube 10.4) |
Hey @mc1arke, first of all, thank you for your fantastic work. The plugin works like a charm and has been a very pleasant experience! I'm unsure if my reporting is a bug or should be considered an enhancement.
Describe the bug
Currently, the last comment made by the bot is being minimized regardless of the project key, so only a part of my analysis is visible.
To Reproduce
Steps to reproduce the behavior:
On a mono repo setup, run two Sonarqube analyses with different project keys
Expected behavior
In a mono repo setup, a branch with multiple projects affected should have the latest comment of each project visible.
Screenshots
Software Versions
Additional context
I'm available if you need any additional context or help to reproduce. Although I'm not a Java programmer, I can contribute if you support this enhancement but don't have the time to commit to it.
The text was updated successfully, but these errors were encountered: