gh pr view
Use at the start to get all review comments and PR metadata.
Provides the core context of what needs to be fixed from a human perspective.
gh pr checks
After getting comments, to check the technical status.
Quickly identifies if there are failing automated checks that need investigation.
new_task (mode: translate)
When changes affect user-facing content, i18n files, or UI components that require translation.
Ensures translation consistency across all supported languages when PR fixes involve user-facing changes.
gh pr checks --watch
After pushing a fix, to confirm that the changes have resolved the CI/CD failures.
Provides real-time feedback on whether the fix was successful.
Always fetch details with --json to get structured data: gh pr view [PR_NUMBER] --repo [owner]/[repo] --json number,title,author,state,body,url,headRefName,baseRefName,files,additions,deletions,changedFiles,comments,reviews,mergeable,mergeStateStatus,isCrossRepository
Parse the JSON output to extract branch name, owner, repo slug, and mergeable state.
Use gh pr view --json comments to get all comments in structured format.
Parse all comments to create a checklist of required changes.
Ignore comments that are not actionable or have been resolved.
Use this command to get the exact error messages from failing tests.
Search the log for keywords like 'error', 'failed', or 'exception' to quickly find the root cause.
Always specify run ID explicitly to avoid interactive selection prompts: gh run view [RUN_ID] --log-failed
Get run IDs with: gh run list --pr [PR_NUMBER] --repo [owner]/[repo]
Use --force flag: 'gh pr checkout [PR_NUMBER] --repo [owner]/[repo] --force'
If gh checkout fails, use: git fetch origin pull/[PR_NUMBER]/head:[branch_name]
Use --force-with-lease for safer force pushing.
Use GIT_EDITOR=true to prevent interactive prompts during rebases.
Always determine the correct remote before pushing (origin vs fork).
Check if PR is from a fork: 'gh pr view [PR_NUMBER] --repo [owner]/[repo] --json isCrossRepository'
If isCrossRepository is true, add fork remote if needed
Push to appropriate remote: 'git push --force-with-lease [remote] [branch]'
Delegate to merge-resolver mode using new_task
Provide the PR number (e.g., "#123") as the message
The merge-resolver mode will handle all conflict resolution automatically
Use --watch flag to monitor checks in real-time: 'gh pr checks [PR_NUMBER] --repo [owner]/[repo] --watch'
For one-time status checks, use --json flag: 'gh pr checks [PR_NUMBER] --repo [owner]/[repo] --json state,conclusion,name'
The --watch flag automatically updates the display as check statuses change.
Use 'gh run list --pr [PR_NUMBER] --repo [owner]/[repo]' to get detailed workflow status if needed.
After analyzing all the problems (reviews, tests, conflicts), present a summary to the user.
Provide clear, actionable next steps as suggestions.
Example suggestions: "Address review comments first.", "Tackle the failing tests.", "Resolve merge conflicts."
Use when PR fixes involve changes to user-facing strings, i18n files, or UI components.
Provide specific details about what content needs translation in the message.
Include file paths and descriptions of the changes made.
List all affected languages that need updates.
Wait for translation completion before proceeding to validation phase.
Changes to webview-ui/src/i18n/locales/en/*.json files
Changes to src/i18n/locales/en/*.json files
Modifications to UI components with user-facing text
Updates to announcement files or documentation requiring localization
Addition of new error messages or user notifications
translate
Translation updates needed for PR #1234 fixes. Please translate the following changes:
Files modified:
- webview-ui/src/i18n/locales/en/common.json: Added new error message "connection_failed"
- webview-ui/src/components/settings/ApiSettings.tsx: Updated button text from "Save" to "Save Configuration"
Please ensure all supported languages (ca, de, es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW) are updated with appropriate translations for these changes.
]]>
Use when PR has merge conflicts that need to be resolved.
Simply provide the PR number (e.g., "#123") as the message.
The merge-resolver mode will handle checkout, rebase, conflict resolution, and pushing.
Wait for merge-resolver to complete before continuing with other PR fixes.
When gh pr view shows mergeable: false or mergeStateStatus: CONFLICTING
When git rebase fails with conflicts
When git status shows unmerged paths
merge-resolver
#1234
]]>
gh pr view [PR_NUMBER] --repo [owner]/[repo] --json [fields]
gh pr checkout [PR_NUMBER] --repo [owner]/[repo] --force
gh pr checks [PR_NUMBER] --repo [owner]/[repo] [--watch|--json]
gh pr comment [PR_NUMBER] --repo [owner]/[repo] --body "[text]"
gh run list --pr [PR_NUMBER] --repo [owner]/[repo]
gh run view [RUN_ID] --repo [owner]/[repo] --log-failed
gh workflow view [WORKFLOW_NAME] --repo [owner]/[repo]