Ahoy! First of all, this has been a really useful tool.
After some time neglecting a stable of repositories with automated dependency updates, I had a depressing number of PRs to merge, with mix of failing and passing status checks. I needed a way to bulk merge only those that pass checks, and set about trying to display the commit status in the summary table. This PR is the result of that attempt, which got slightly out of hand. It includes the following changes:
Display the check status of the last commit to a PR in the summary table (fixes #12). This turns out to be impossible to get from the v3 API (the commit status endpoint is just broken), so I switched to the GraphQL-based v4 API.
Interpret repo names without a slash as owners, and search for PRs against repos with that owner (simpler in the GraphQL API, and useful for me)
Consolidate PR manipulation for multi/single-repo case
Omit commit message when merging (effectively fixes #105 by letting GitHub generate the commit body, including co-author fields)
Optionally filter PRs by label (fixes #79). This added more complexity than I would have liked because of the way that the query is encoded in struct tags, and there may be a cleaner way to do this.
Attempt to approve PRs that need reviews before merging them (addresses #96, but without the UX). Note that this only works for repos with classic branch protection rules; the new-style repository rulesets don't seem to appear in the API.
I realize that this is kind of a monster, and am happy to break it down into smaller changes if that's helpful. Comments welcome!
Ahoy! First of all, this has been a really useful tool.
After some time neglecting a stable of repositories with automated dependency updates, I had a depressing number of PRs to merge, with mix of failing and passing status checks. I needed a way to bulk merge only those that pass checks, and set about trying to display the commit status in the summary table. This PR is the result of that attempt, which got slightly out of hand. It includes the following changes:
I realize that this is kind of a monster, and am happy to break it down into smaller changes if that's helpful. Comments welcome!