Commands: `shepherd merge`
shepherd merge <migration> [--repos org1/repo1,org2/repo2] [--ignore-checks] [--ignore-approvals]
Merge all mergeable PRs for a migration. This would help when managing large migrations, e.g. in the hundreds of repos. I think the safest version of this command defaults to requiring 1 PR approval, 100% approval by reviewers (or at least no changes-requested reviews), and all status checks to be successful.
Arguments:
-
--ignore-checks: Don't require status checks to exist/be successful -
--ignore-approvals: Don't require at least one approval, or 100% approval
This sounds great! Agree on having sane defaults for approvals in case some repos might not require reviews prior to merging; for automated changes, one probably still wants to get human eyes on it. Also agree on having overrides in case you really know what you're doing 🙂
My workaround:
# get pr urls
shepherd pr-status "$PROJECT" | grep -o -e "https://github.com/[^/]*/[^/]*/pull/[0-9]*" > urls.txt
# merge via GitHub CLI
cat urls.txt | xargs -IXXX gh pr merge -m XXX
Requirement: https://cli.github.com/