Loading...
Loading...
Addresses all PR review comments, resolves merge conflicts, and fixes failing CI checks to get the PR ready to merge. Use when the user wants to make their PR "all green" or ready for merge.
npx skill4agent add continuedev/skills all-green# Get current branch and find associated PR
gh pr view --json number,title,url,headRefName,baseRefName,mergeable,mergeStateStatus,reviewDecision# Check for merge conflicts
gh pr view --json mergeable,mergeStateStatus
# Get CI check status
gh pr checksgh api graphql -f query='
{
repository(owner: "{owner}", name: "{repo}") {
pullRequest(number: {pr_number}) {
reviewThreads(first: 100) {
nodes {
id
isResolved
comments(first: 5) {
nodes { body path line author { login } }
}
}
}
}
}
}'"isResolved": falsegh api graphql -f query='
mutation {
addPullRequestReviewThreadReply(input: {
pullRequestReviewThreadId: "PRRT_xxx"
body: "Fixed in commit abc123"
}) {
comment { id }
}
}'gh api graphql -f query='
mutation {
resolveReviewThread(input: {
threadId: "PRRT_xxx"
}) {
thread { isResolved }
}
}'# Fetch latest changes
git fetch origin
# Get the base branch name from PR
BASE_BRANCH=$(gh pr view --json baseRefName -q .baseRefName)
# Rebase onto the base branch
git rebase origin/$BASE_BRANCH# After resolving conflicts
git add <resolved-files>
git rebase --continue
# Verify types still check
npm run tsgo:check# Get detailed check failure information
gh pr checks --json name,state,conclusion,detailsUrlnpm run tsgo:check # Identify the errors
# Fix each type error in the reported filesnpm run lint # See lint issues
npm run lint:fix # Auto-fix what's possible
# Manually fix remaining issuesnpm test # Run tests to see failures
# Read failing test files and fix the issues# If you rebased, force push is required
git push --force-with-lease
# If you only added commits
git push# Block until checks finish, exit immediately on first failure
gh pr checks --watch --fail-fastgh pr checks --watch --fail-fast# See which check failed and get the details URL
gh pr checks --json name,state,conclusion,detailsUrl
# View the failed run logs directly
gh run view <run-id> --log-failedgh pr checks --watch --fail-fastgh pr view --json mergeable,mergeStateStatus,reviewDecisiongh run view <run-id> --log-failed# 1. See what we're dealing with
gh pr view --json number,title,mergeable,mergeStateStatus,reviewDecision
gh pr checks
# 2. MANDATORY: Fetch ALL review threads and find unresolved ones
gh api graphql -f query='{
repository(owner: "OWNER", name: "REPO") {
pullRequest(number: PR_NUM) {
reviewThreads(first: 100) {
nodes { id isResolved comments(first: 5) { nodes { body path line author { login } } } }
}
}
}
}'
# 3. Address each unresolved thread: read code, make fix, commit
# 4. Push fixes
git push
# 5. Reply to and resolve EVERY addressed thread
gh api graphql -f query='mutation { addPullRequestReviewThreadReply(input: { pullRequestReviewThreadId: "PRRT_xxx", body: "Fixed in abc123 — added encodeURIComponent" }) { comment { id } } }'
gh api graphql -f query='mutation { resolveReviewThread(input: { threadId: "PRRT_xxx" }) { thread { isResolved } } }'
# 6. VERIFY: Re-fetch threads and confirm zero unresolved remain
# (Re-run the GraphQL query from step 2, filter for isResolved: false)
# 7. If there are merge conflicts, rebase
git fetch origin
git rebase origin/main
# ... resolve conflicts ...
git add .
git rebase --continue
# 8. Fix any failing checks
npm run tsgo:check
npm run lint:fix
npm test
# 9. Push and wait for checks (blocks until complete, fails fast)
git push --force-with-lease
gh pr checks --watch --fail-fast
# 10. If checks failed, fix and repeat. Once green:
gh pr view --json mergeable,mergeStateStatus,reviewDecision