The lgtm bot is essentially unmaintained and has a number of bugs:
- It forgets approval status after the branch is updated via merge and needs to be triggered with a comment to update status, which is very annoying.
- It incorrectly parses "LGTM after ..." from comments
I think we could replace it with lightweight functionality in this bot. The bot tasks are:
- Handle
lgtm/need-*
labels, a subtraction of required approver count against actual approvers.
- Add a commit status or check that suceeds if approval count is >= 2. See here for the diferences between the APIs.
Parsing comments is out of scope for this bot. It is simply not needed any more now that GH has the approvers data (the lgtm bot came from a time before this where a PR could only have a single approver).
For counting approvers, it should count maintainer role and above and this is where we differ from GitHub's view of approvers, where we allow even people without push access to approve and those are visible by the green checkmark. Maybe the upcoming repo rules will allow us to give maintainers a green checkmark.