Closed martinklepsch closed 6 years ago
Re EDIT: It seems that GitHub is currently not allowing Apps to create review requests: https://github.com/probot/probot/issues/336#issuecomment-353247075 π
@martinklepsch wow, that's almost unbelievable that they haven't up opened that API for bots! I guess we could as a workaround use a user token for an unavailable operation like this. That token is already available in the form of process.env.SLACK_USER_TOKEN
via #4
First of all my JS is pretty horrible, which I just realized once again while working on this π
This PR solves the first part of #4 which is allowing users to request reviews using a comment. It currently takes mentions out of any comment starting with
/review
and requests a review from all mentioned users.If any mentioned user is not in the Slack username mapping configuration the process will fail. If any user does not have write access to the repository the process will fail.
Probably worth doing:
/review
this will allow more text/mentions to be part of a comment without implicitly causing everyone to be requested as reviewer.I did test this using a project I created but since I can't request a review from myself I would have needed to add another person to the project which I might do eventually but haven't gotten around to yet.
In general I found that this project requires a lot of manual setup (Github App/Slack Team/Slack Integration) which is unfortunate and maybe a little bit annoying to new contributors. While it doesn't seem possible to automate those steps I believe it would be appropriate to have very detailed documentation how to set those things up. Whatever can be automated should be automated. (Project board setup etc.)
EDIT I know did some testing with another person and it seems that push access is required to create review requests π€ Will need to add that...