Fix PR URL handling in factory ceo input resolution#457
Conversation
Add _parse_pr_url() regex helper to extract owner/repo and PR number from GitHub PR URLs (including /files and /commits suffixes). Modify _resolve_input() to detect PR URLs before generic GitHub URLs, clone the base repo, and run `gh pr checkout` to land on the PR branch. Closes #456 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #457 +/- ##
==========================================
+ Coverage 87.08% 87.10% +0.01%
==========================================
Files 62 62
Lines 9682 9697 +15
==========================================
+ Hits 8432 8447 +15
Misses 1250 1250 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
✅ Factory Review: KEEPVerdict: KEEP Experiment: #1 Guard Checks
Smoke Test
Code Quality Assessment
Code Review Notes
Posted by Factory Reviewer |
✅ Factory Review: KEEPVerdict: KEEP Experiment: #1 Score Comparison
Guard Checks
Code Quality Assessment
Code Review Notes
Posted by Factory Reviewer |
|
@gx-ai-architect we will close this one too |
Closes #456
Changes
_parse_pr_url()regex helper infactory/cli.pyto extractowner/repoand PR number from GitHub PR URLs (supports/filesand/commitssuffixes)_resolve_input()to detect PR URLs before generic GitHub URLs, clone the base repo, and rungh pr checkout <number>to land on the PR branchtests/test_cli.py:test_parse_pr_url_basic— basic owner/repo + number extractiontest_parse_pr_url_with_suffix— handles/filesand/commitssuffixestest_parse_pr_url_not_pr— regular repo URLs return Nonetest_resolve_input_pr_url— full clone+checkout flow with mocked subprocess.run