shepherd icon indicating copy to clipboard operation
shepherd copied to clipboard

Commands: `shepherd merge`

Open alexturek opened this issue 6 years ago • 2 comments

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

alexturek avatar Sep 24 '19 20:09 alexturek

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 🙂

nwalters512 avatar Sep 24 '19 22:09 nwalters512

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/

azu avatar May 13 '21 00:05 azu