ideas icon indicating copy to clipboard operation
ideas copied to clipboard

WIP limit enforcer

Open HerrBertling opened this issue 7 years ago • 2 comments

I bumped into this issue with quite some teams in the last years, so:

The wip-limit-enforcer does exactly that: It enforces a work in progess limit on pull requests. It closes newly opened pull requests, if they would increase the number of open pull requests beyond a defined number (the wip limit). For this, it takes:

  • A WIP limit (of course :smile:)
  • A list of labels/words for pull requests to stay open regardless 📝
  • A nice message to post in a pull request it closes :love_letter:
  • A label to set for closed PRs 🏷

It then checks every new pull request for e.g. bug, fix or certain labels. If the pull request does not match these and overall number of other pull requests === wip limit, then the pull request gets closed and gets a label, e.g. backlog for later prioritisation.

I know this is pretty harsh. And I think it could help teams get things into a production state faster, enforce decisions and prevent too many pull requests, merge conflicts,… 🌈

What do you think?

HerrBertling avatar May 08 '18 07:05 HerrBertling

Why not close the oldest open WIP PR instead of the newest one?

j-f1 avatar May 08 '18 10:05 j-f1

I'd argue that the oldest PR should be the one to get the highest priority to work on. There will (well, should™) be a reason why it was opened. If there is not, it should be closed manually, i.e. with a conscious decision. Then you'd be able to pull new work from your backlog.

This bot should not punish other work because new work is pushed into the pipeline. It should shed light on new work being pushed into the pipeline instead of finishing already started work first.

HerrBertling avatar May 08 '18 11:05 HerrBertling