Skip to content

Commit

Permalink
chore: add pr approval function
Browse files Browse the repository at this point in the history
  • Loading branch information
miszo committed Dec 16, 2024
1 parent e569a58 commit 22e7e67
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions home/dot_config/zsh/dot_zsh_functions.zsh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,13 @@ function delete_recursively {
readonly folder_name=${1:?"node_modules"}
find . -name "$folder_name" -type d -prune -print -exec rm -rf '{}' \;
}

function pr_approve {
# if the pr id is not provided, then return error with a message
if [ -z "$1" ]; then
echo "Please provide the pull request number"
return 1
fi

gh pr review $1 --approve
}

0 comments on commit 22e7e67

Please sign in to comment.