Created
June 2, 2025 19:08
-
-
Save philipaconrad/c14f9254ec3b148d3991dd0974e1ce47 to your computer and use it in GitHub Desktop.
Dependabot "squash and merge" CLI alias for ZSH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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