Skip to content

Instantly share code, notes, and snippets.

@mfilej
Created March 6, 2024 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfilej/75b2d97ab224adfdfce6881b1703235c to your computer and use it in GitHub Desktop.
Save mfilej/75b2d97ab224adfdfce6881b1703235c to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -e
usage() {
echo "Usage: gh dependabot <merge|rebase> <pull-request-number>"
echo
echo "Will tell dependabot to merge by commenting on the given pull request number."
}
action="$1"
case $action in
merge|rebase)
;;
*)
usage
exit
;;
esac
shift
if [ $# -eq 0 ]; then
usage
exit
fi
pr="$1"
gh pr comment "$pr" --body "@dependabot ${action}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment