-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat(reaction): disable reactions by setting an empty string #3360
Conversation
73c155c
to
3ff1395
Compare
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.
Thank you for cleaning this up
…b, and only worked for 'atlantis' command. This commit improves on that to make it possible to implement reactions in other VCS providers and also reuse the existing comment parsing.
621db39
to
41310bf
Compare
Were you also able to test in your setup with the reaction and without? |
I tested the previous version, and it only added reactions for 'atlantis' and not @botnick, that's what motivated this PR. Here's it looks in our sandbox now: |
Thanks @marcusramberg ! We really appreciate your PRs. Looking forward to the next release! For now, please use the |
this is pretty cool thanks @marcusramberg again!!! |
…ntis#3360) * fix: Previous implementation tried to do comment parsing inside github, and only worked for 'atlantis' command. This commit improves on that to make it possible to implement reactions in other VCS providers and also reuse the existing comment parsing. * test: Add negative test to confirm reactions are not added for invalid comments * test: Add a negative test to confirm invalid commands do not get a reaction
…ntis#3360) * fix: Previous implementation tried to do comment parsing inside github, and only worked for 'atlantis' command. This commit improves on that to make it possible to implement reactions in other VCS providers and also reuse the existing comment parsing. * test: Add negative test to confirm reactions are not added for invalid comments * test: Add a negative test to confirm invalid commands do not get a reaction
…ntis#3360) * fix: Previous implementation tried to do comment parsing inside github, and only worked for 'atlantis' command. This commit improves on that to make it possible to implement reactions in other VCS providers and also reuse the existing comment parsing. * test: Add negative test to confirm reactions are not added for invalid comments * test: Add a negative test to confirm invalid commands do not get a reaction
This commit improves on that to make it possible to implement reactions in other VCS providers and also reuse the existing comment parsing.
what
My initial implementation of the reactions have a couple of problems:
@bot-nick apply
why
This PR attempts to remedy the above problems by passing the comment ID to handleCommentEvent and doing
the reaction from there. The test written for the functionality continues to pass, indicating that react is
still being called :) I've also added a check to allow disabling reactions by setting them to the empty
string.
Other VCS providers can then be implemented by passing a comment id and implementing ReactToComment
tests
This refactor is tested through the unit test added in previous PR.
references
Initial reaction implementation in #2706