Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ compdef _git gs=git-status
alias gw='git worktree'
compdef _git gw=git-worktree

alias gsync='set -x; git checkout main; gh repo sync; git pull; { set +x; } 2>/dev/null'

## Worktree helpers
alias gwa='~/scripts/git-worktree-add.sh'
alias gwr='~/scripts/git-worktree-remove.sh'
Expand All @@ -66,3 +64,10 @@ compdef _git gwr=git-checkout
## GitHub CLI
alias gpr='gh pr list'
alias gprme='gh pr list --search "review-requested:@me"'

## Sync fork with upstream
sf() {
local repo=$(git remote get-url origin | sed -E 's#.*github\.com[:/](.+)\.git#\1#')
echo "gh repo sync $repo"
gh repo sync "$repo"
}
5 changes: 5 additions & 0 deletions approve-prs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ while IFS= read -r LINE; do
echo

if [[ "$CONFIRM" =~ ^[Yy]$ ]]; then
if gh pr merge --auto --merge "$PR_NUMBER" --repo "$REPO"; then
echo "Enabled automerge on PR #$PR_NUMBER"
else
echo "Warning: Failed to enable automerge on PR #$PR_NUMBER"
fi
if gh pr review "$PR_NUMBER" --repo "$REPO" --approve; then
echo "Approved PR #$PR_NUMBER"
else
Expand Down