From a2ff2cd5e841848aac99dd442ccf5f85a304eefb Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Fri, 26 Jun 2026 12:03:13 -0700 Subject: [PATCH 1/2] enable automerge --- approve-prs.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/approve-prs.sh b/approve-prs.sh index 1388c10..0d4b64a 100755 --- a/approve-prs.sh +++ b/approve-prs.sh @@ -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 From 1f6e842df24f17bacf7adfeeb7f3803edc61be43 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Fri, 26 Jun 2026 12:04:40 -0700 Subject: [PATCH 2/2] add alias to sync fork --- .zshrc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index 5cdd342..ac8b7b3 100644 --- a/.zshrc +++ b/.zshrc @@ -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' @@ -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" +}