-
-
Notifications
You must be signed in to change notification settings - Fork 104
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedpriority: normal
Description
Motivation
The autodetection of the code-actions feature is supposed to mostly target beginners who do not know how to properly post formatted code yet.
Top Helpers usually always post well formatted and nice looking code, for them the auto-detection is rather annoying.
We should adjust our autodetection to ignore messages send by Top Helpers.
Fix
In CodeMessageAutoDetection, we already have code to exit in certain situations:
if (event.isWebhookMessage() || event.getAuthor().isBot() || !isHelpThread(event)) {
return;
}
...
long amountOfCodeLines = maybeCode.orElseThrow().code().lines().limit(MINIMUM_LINES_OF_CODE).count();
if (amountOfCodeLines < MINIMUM_LINES_OF_CODE) {
return;
}We should simply adjust this and add a condition to exist isSendByTopHelper or similar.
To detect Top Helpers, we can either use the existing
"tagManageRolePattern": "Moderator|Community Ambassador|Top Helpers .+",(it is okay if those other roles are also included then)
or introduce a new config entry.
In any case, we just have to iterate the roles of the author and check if any of them matches that predicate.
marko-radosavljevic
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedpriority: normal
