name: oxgl:wait-for-review description: Wait for AI code review on an MR, analyze findings, and offer to address issues
Context
First, run these commands and review their output:
- Git remote:
git remote get-url origin
Your Task
- Get MR number: Use
$ARGUMENTSif provided, otherwise detect from current branch withglab mr view --output json | jq '.iid' - Checkout MR branch: Run
glab mr checkout <MR_IID>to ensure you're on the MR's branch (safe to run even if already on the branch) - Wait for AI review: Run
python3 scripts/wait_for_ai_review.py <MR_IID>(use 45 minute timeout) - Read all MR notes: Parse the project path from the git remote above, then get the project ID with
glab repo view --output json | jq '.id'and runglab api "/projects/{project_id}/merge_requests/<MR_IID>/notes" --jq '[.[] | select(.system == false)]' - Analyze and respond:
- If there are findings: identify the highest priority review comment only. Investigate the codebase to understand that specific issue, then immediately create an implementation plan to fix it using TDD. Do NOT ask the user whether they want to fix the issue - assume they do. Write the full plan directly. Ignore lower priority comments for now.
- If no findings: report success