lgtmco / lgtm

LGTM is a simple pull request approval system [ARCHIVE]
Apache License 2.0
988 stars 124 forks source link

Accept reactions as an approval #31

Open bdougherty opened 8 years ago

bdougherty commented 8 years ago

Would be cool to support reactions to the initial PR comment instead of adding a new comment.

https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments

bradrydzewski commented 8 years ago

github added a preview for the new reactions API not too long ago: https://developer.github.com/changes/2016-05-12-reactions-api-preview/

I'm not actively adding new features to lgtm (it is not abandoned, I just have some larger and more demanding open source projects I need to focus on right now) but am open to a pull request for this specific feature. The pull request would probably have to include:

  1. ability to enable reactions via the .lgtm file
  2. if enabled, make the API call to get all reactions for the parent issue/comment
  3. calculate approvals based on reactions instead of comment text

We probably need to specify the limitation that the reactions would need to come from the parent comment, since making an API call for each individual comment to get the reactions is probably not viable due to API throttling, and to some lesser extent resource utilization.

Definitely open to the idea.

bradrydzewski commented 8 years ago

note that we also need to see if GitHub provides a hook for reactions. Right now I don't see any documentation that reactions trigger a hook which would be required to notify LGTM https://developer.github.com/v3/activity/events/types/

I didn't look exhaustively but will do some more research and post back here.