zappr icon indicating copy to clipboard operation
zappr copied to clipboard

Feature request: check how much lines of code were changed.

Open drummerwolli opened this issue 6 years ago • 3 comments

In our team, we have sometimes the problem that we have Pull Requests which are way too big. To enforce the developers to commit smaller chunks for review, it would be interesting to check the size of the PR.

It is possible to get the additions and deletions in a PR via the GH API: https://developer.github.com/v3/pulls/#get-a-single-pull-request

Would it be possible to include a check where i can set the maximum (maybe for someone else also minimum) number of lines changed / additions and deletions?

drummerwolli avatar Mar 14 '18 17:03 drummerwolli

also restricting changed_files(same call) could be an additional option

drummerwolli avatar Mar 14 '18 17:03 drummerwolli

Hi @lotharschulz,

I can take up this issue. Any pointers should I know before starting?

So, another method in PullRequestTasks to get additions, deletions and changed_files from pull-request payload and verify them to be less than config.pull-request.tasks.maximum-additions, maximum-deletions and maximum-changed-files should do the trick, right?

sathish-kumar-subramani avatar Oct 22 '18 17:10 sathish-kumar-subramani

@sathish-kumar-subramani I ask you to align with the code maintainers https://github.com/zalando/zappr/blob/master/MAINTAINERS with regards to the pointers you requested. Sorry for answering that late.

lotharschulz avatar Aug 19 '19 12:08 lotharschulz