Skip to content

Conversation

@CodePawfect
Copy link
Contributor

@CodePawfect CodePawfect commented Dec 26, 2022

closes #719

This pull request includes the following changes:

In the application/config.json.template file, a new key called ignoreMessageAutoDetectionRolePattern has been added.

In the CodeMessageAutoDetection.java file, a new method called isSentByIgnoredMember has been added to check if a message was sent by a member with a role that matches the ignoreMessageAutoDetectionRolePattern specified in the configuration.

In the Config.java file, a new field called ignoreMessageAutoDetectionRolePattern has been added to the Config class.

These changes allow for the configuration of a role pattern that will be used to ignore messages from members with matching roles in the CodeMessageAutoDetection feature. This can be useful for preventing certain roles from triggering code message detection and handling.

Screenshots:
"Code action autodetection is triggered by a user without roles (User catlitter)"
"Code action autodetection is not triggered by a user with Top Helpers Role (User mdyingstar)"
image

@CodePawfect CodePawfect requested review from a team as code owners December 26, 2022 09:50
@CLAassistant
Copy link

CLAassistant commented Dec 26, 2022

CLA assistant check
All committers have signed the CLA.

@marko-radosavljevic
Copy link
Contributor

Ran the checks for you. Make sure to run spotless with ./gradlew spotlessApply in the root project directory or gradle task spotlessApply in your IDE. ^^

It should be done automatically if you built the project at least once, with a git pre-commit hook.

@CodePawfect
Copy link
Contributor Author

CodePawfect commented Dec 26, 2022 via email

@CodePawfect
Copy link
Contributor Author

I ran ./gradlew spotlessApply and gradle build. Builds successful. Hope this is enough to match the workflow requirements.

@Taz03
Copy link
Member

Taz03 commented Dec 26, 2022

u'll need to sign the cla too

role pattern comes now from config file instead of hardcoded;
@CodePawfect CodePawfect requested a review from Taz03 December 26, 2022 19:53
…fig.java;

renamed and adjusted isCodeActionIgnored;
@CodePawfect CodePawfect requested a review from Taz03 December 27, 2022 14:29
@CodePawfect CodePawfect requested a review from Taz03 December 27, 2022 19:05
Taz03
Taz03 previously approved these changes Dec 27, 2022
Copy link
Member

@Taz03 Taz03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, make sure to test it tho

Copy link
Contributor

@marko-radosavljevic marko-radosavljevic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just some minor changes and naming. ☺️

refactored variable names in CodeMessageAutoDetection;
@CodePawfect CodePawfect requested review from Taz03 and marko-radosavljevic and removed request for Taz03 and marko-radosavljevic December 30, 2022 17:32
@CodePawfect CodePawfect requested review from Taz03 and marko-radosavljevic and removed request for Taz03 and marko-radosavljevic December 30, 2022 17:56
Copy link
Contributor

@marko-radosavljevic marko-radosavljevic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ❤️

@CodePawfect CodePawfect requested a review from Taz03 December 30, 2022 18:43
@marko-radosavljevic marko-radosavljevic changed the title Features/code actions autodetection should not trigger for top helpers Make code actions autodetection not trigger for top helpers+ Dec 31, 2022
@marko-radosavljevic marko-radosavljevic merged commit 88ce49f into Together-Java:develop Dec 31, 2022
@marko-radosavljevic marko-radosavljevic mentioned this pull request Jan 8, 2023
marko-radosavljevic pushed a commit that referenced this pull request Jan 8, 2023
* Adjust onMessageReceived conditions to ignore codeformatting bot responses for Top Helpers role
Fede923 pushed a commit to Fede923/TJ-Bot that referenced this pull request Jan 21, 2023
…r-Java#733)

* Adjust onMessageReceived conditions to ignore codeformatting bot responses for Top Helpers role
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: normal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code actions autodetection should not trigger for Top Helpers

4 participants