This turns the check-cherry-pick script into a github-script based JavaScript program. This makes it much easier to extend to check reverts or merge commits later on.
This can and should be re-used across different scripts.