I'd like to be able to monitor pull requests on my git hub repo and I'm specifically interested in the size of the PR. For example, how many files have changed and how many line additions/deletions. The idea is I would like to highlight PR's that are considered too big.
Can anybody offer any advice on how this could be achieved? I am already using GitHub integrations into Slack which notify my channel of PR's, so wondering if I could hook into that. Or maybe the GitHub API could offer me something.
Thanks in advance.
You should install a repository webhook or modify the one that is built into the Slack integration.
Basically the webhook notifies you of any pullrequest
event. The received payload contains a pull_request
object, with the keys you're looking for:
additions
deletions