Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@robcowie
Last active December 20, 2023 10:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save robcowie/41fc45afb57366f0afe613caf4527c08 to your computer and use it in GitHub Desktop.
Save robcowie/41fc45afb57366f0afe613caf4527c08 to your computer and use it in GitHub Desktop.
gh cli commands to work with Dependabot PRs
# Github CLI commands to work with dependabot PRs
# List dependabot PRs that need review
gh pr list -l dependencies --search "status:success review:none"
gh pr list -A app/dependabot --search "status:success review:none"
# Instruct dependabot to merge all reviewed PRs, oldest first
gh pr list \
-A app/dependabot \
--search "status:success review:approved" \
--json number --jq "reverse | .[].number" | xargs -t -I _ gh pr comment _ -b "@dependabot merge"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment