Skip to content

code_review: default review_context_repo from the patch's own repo - #6488

Merged
suhaibmujahid merged 2 commits into
mozilla:masterfrom
padenot:review-context-repo-default
Aug 4, 2026
Merged

code_review: default review_context_repo from the patch's own repo#6488
suhaibmujahid merged 2 commits into
mozilla:masterfrom
padenot:review-context-repo-default

Conversation

@padenot

@padenot padenot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Previously review_context_repo had to be passed explicitly to every review. Add Patch.github_repo()/github_repo_branch() hooks (default None/"main") so each platform can answer this from what it already knows. PhabricatorPatch resolves it by mapping the revision's repository callsign to its GitHub mirror and branch. The agent only consults this when the caller didn't pass review_context_repo explicitly, so existing callers are unaffected.

When we're ready to make this work on github, it will be quite natural and quick to do.

@padenot
padenot requested a review from a team as a code owner August 3, 2026 13:20
@padenot

padenot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@suhaibmujahid implemented it as you said, with a set of defaults.

Previously review_context_repo had to be passed explicitly to every
review. Add Patch.github_repo()/github_repo_branch() hooks (default
None/"main") so each platform can answer this from what it already
knows. PhabricatorPatch resolves it by mapping the revision's
repository callsign to its GitHub mirror and branch. The agent only
consults this when the caller didn't pass review_context_repo
explicitly, so existing callers are unaffected.
@padenot
padenot force-pushed the review-context-repo-default branch from a04b2f8 to 755fcd9 Compare August 3, 2026 17:04
suhaibmujahid
suhaibmujahid previously approved these changes Aug 3, 2026
Comment thread bugbug/tools/core/platforms/phabricator.py Outdated
@suhaibmujahid
suhaibmujahid merged commit beb81a2 into mozilla:master Aug 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants