Created
March 6, 2024 09:57
-
-
Save mfilej/75b2d97ab224adfdfce6881b1703235c to your computer and use it in GitHub Desktop.
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
#!/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