Github: detect traction requests and their size

I would like to be able to track download requests in my registry of git hubs, and I am particularly interested in the size of PR. For example, how many files were changed and how many lines were added / deleted. The idea is that I would like to highlight PRs that are considered too large.

Can anyone offer any advice on how this can be achieved? I already use the GitHub integration in Slack, which notify my PR channel, so I wonder if I can get caught in this. Or maybe the GitHub API can offer me something.

Thanks in advance.

+4
source share
1 answer

You should install the webhook repository or change the one that is built into Slack integration.

Basically, the web host notifies you of any pullrequestevent . The resulting payload contains the object pull_requestwith the keys you are looking for:

  • additions
  • deletions
+2
source

Source: https://habr.com/ru/post/1628719/


All Articles