DefinitelyTyped / dt-mergebot

The bot which handles auto-merging your PRs
https://devblogs.microsoft.com/typescript/changes-to-how-we-manage-definitelytyped/
MIT License
112 stars 44 forks source link

Mimic `git merge-base` #433

Closed elibarzilay closed 2 years ago

elibarzilay commented 2 years ago

Github doesn't provide a merge-base thing, so previously the code used "master" to compare against, which can easily fail.

Find a better commit to compare config contents against (config/owner checks) using the list of commits in the PR.

Note that an alternative would be to use GH's potentialMergeCommit (compare "master" as the old, and this as the new). It takes a while for it to be generated, but we already wait until mergeable is not "UNKNOWN" which might mean that this is ready too. But even with that, it seems like a bad idea to rely on information from these temporary merge branches.