Skip to content

Instantly share code, notes, and snippets.

@joeswann
Created March 25, 2025 00:29
Show Gist options
  • Save joeswann/3367ab230f968558c3e2d178f9bb8df6 to your computer and use it in GitHub Desktop.
Save joeswann/3367ab230f968558c3e2d178f9bb8df6 to your computer and use it in GitHub Desktop.
Bash Pull Request – CLI Workflow
pr() {
pr=$(gh pr list --limit 20 | fzf --height 40% --reverse --border | awk '{print $1}')
if [ -n "$pr" ]; then
current_user=$(git config user.name)
gh pr review "$pr" --approve -b "Reviewed by: $current_user"
gh pr merge "$pr" --body "Accepted by: $current_user"
else
echo "No PR selected."
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment