When we recently refactored the code to use the maintainer map for related labels, we made a mistake: When a PR has no packages with maintainers returned from eval, the label would internally be set to `0` instead of `false`. The code would then go on compare the before and after labels with strict equality - and assume a difference, because `0 !== false`. Thus, it seemed like new labels needed to be set, so the PUT request was actually sent. Of course, the labels were actually the same - when filtering the labels to be set, the `0` would also be treated as falsy, so the label would not be set. This would result in no visible change in the PR, but internall GitHub would replace the `updated_at` timestamp for that PR - after all we replaced all labels. Repeatedly updating *all* PRs we're looking at quickly causes problems, because we are going to look at the same PRs *again* in the next cycle - essentially causing infinite recursion. The bot became slower and slower over time, because it had to process more and more PRs each run. Simply casting this to a proper Boolean, should get us out of the mess soon.
23 KiB
23 KiB