Skip to content

Instantly share code, notes, and snippets.

@philipaconrad
Created June 2, 2025 19:08
Show Gist options
  • Save philipaconrad/c14f9254ec3b148d3991dd0974e1ce47 to your computer and use it in GitHub Desktop.
Save philipaconrad/c14f9254ec3b148d3991dd0974e1ce47 to your computer and use it in GitHub Desktop.
Dependabot "squash and merge" CLI alias for ZSH
# Requires the `gh` CLI application to be installed and set up with your OAuth token.
dependabot-approve-merge() {
# Store the first parameter
local repo_name="$1"
# Shift to remove the first parameter from the list
shift
# Loop through remaining parameters
for param in "$@"; do
gh pr review -a --repo="$repo_name" "$param"
gh pr comment --repo="$repo_name" "$param" -b "@dependabot squash and merge"
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment