Skip to content

Instantly share code, notes, and snippets.

@spmason
Created December 15, 2021 10:45
Show Gist options
  • Save spmason/af8f588158da32d83ea1d1b28a34f3cc to your computer and use it in GitHub Desktop.
Save spmason/af8f588158da32d83ea1d1b28a34f3cc to your computer and use it in GitHub Desktop.
Create an octopus-merge of all pending dependabot PRs that are passing CI
#!/usr/bin/env bash
git co -b dependabot-$(date '+%Y-%m-%d') && \
gh pr list --label dependencies --json number,headRefName --search 'status:success' --jq '.[].headRefName | "origin/\(.)"' \
| xargs git merge && \
pr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment