← ClaudeAtlas

pr-fixuplisted

Automated PR fixup loop — syncs with main, addresses all Copilot review comments, and waits for CI to pass. Run with /pr-fixup or /pr-fixup <PR_NUMBER>.
nick-pape/grackle · ★ 17 · AI & Automation · score 73
Install: claude install-skill nick-pape/grackle
# PR Fixup — Automated Copilot Review Loop This skill automates the full PR-readiness workflow: sync with main, address Copilot review comments in a loop, and verify CI passes. ## Step 0: Detect PR Number If a PR number was provided as an argument, use it. Otherwise detect from the current branch: ```bash gh pr view --json number --jq '.number' ``` If this fails, the current branch has no open PR — tell the user and stop. Store the PR number, repo owner, and repo name for all subsequent commands: ```bash PR_NUMBER=<detected or provided PR number> OWNER=$(gh repo view --json owner --jq '.owner.login') REPO=$(gh repo view --json name --jq '.name') ``` All commands below use `$PR_NUMBER`, `$OWNER`, and `$REPO`. ## Step 1: Sync with Main ```bash git fetch origin git merge origin/main ``` If merge conflicts arise: 1. List the conflicted files with `git diff --name-only --diff-filter=U` 2. Read each conflicted file and resolve the conflicts intelligently 3. Stage the resolved files and commit the merge If no conflicts, and the merge brought in new commits, the merge commit is created automatically. ## Step 2: Build Verification Run the build to catch compile errors before pushing: ```bash rush build ``` If the build fails, fix the errors, commit the fixes, and re-run the build. Only proceed to push once the build succeeds. ## Step 3: Manual Test and Push Before pushing, manually test the PR's changes to catch issues early (see Step 4g for testing instructions). I