-
-
Notifications
You must be signed in to change notification settings - Fork 509
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
Submit Summary Note before issue comments #793
Submit Summary Note before issue comments #793
Conversation
alexintech
commented
Aug 4, 2023
- Added an option to submit Summary Note before issue comments. It can be more convenient with this PR. In that case SonarQube's Summary note will be the first thread in MR, and you don't need to scroll to the end to see results. And this PR will edit existing Summary Note, so it will be on the top of a MR.
- Added tests for the current behavior;
- GitlabMergeRequestDecoratorTest -> switch to JUnit 5;
- Some efforts to simplify creation of mocks for GitlabMergeRequestDecoratorTest and minimize duplication.
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.
Could you alter your commit message to explain the reason for this change, i.e. include a variant of the background of In that case SonarQube's Summary note will be the first thread in MR, and you don't need to scroll to the end to see results
in the commit message body, as well as any other details about other noteable points of the commit Also updated GitlabMergeRequestDecoratorTest to JUnit 5, and pulled duplicated test code into a reusable utility class
context.addExtensions(PropertyDefinition.builder(PR_SUMMARY_NOTE_FIRST) | ||
.category(getName()) | ||
.subCategory("Merge Request Decoration") | ||
.onQualifiers(Qualifiers.PROJECT) | ||
.name("Submit summary note first") | ||
.description("Submit summary discussion thread before issue comments.") | ||
.type(PropertyType.BOOLEAN) | ||
.defaultValue(String.valueOf(false)) | ||
.build()); |
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.
I'm not sure this needs a configuration property. I'm happy that the plugin should remain opinionated and only implement configuration options that Sonarqube's core provides. I'd remove this and just go with the Summary note always being first if that's the direction you think the plugin should be going in
@@ -1 +1 @@ | |||
version=1.15.0-SNAPSHOT | |||
version=1.14.2-SNAPSHOT |
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.
Was there a reason for this version change? I presume you're rebased off a branch and picked up an old version number?
import com.github.mc1arke.sonarqube.plugin.almclient.gitlab.model.Note; | ||
import com.github.mc1arke.sonarqube.plugin.almclient.gitlab.model.User; | ||
|
||
import java.util.*; |
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.
Please ensure your IDE is configured not to use star imports
Closing as abandoned |