mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 16:13:15 +00:00
* feat: route Slack PR review requests Add a lightweight Slack review command path that starts the reviewer graph directly and gives the core agent a handoff tool when review requests are misrouted. * fix: harden Slack PR review routing * fix: validate Slack PR review URLs * fix: preserve malformed GitHub review routing
17 lines
552 B
Python
17 lines
552 B
Python
import asyncio
|
|
from typing import Any
|
|
|
|
from agent.utils.slack import parse_github_pr_url
|
|
from agent.webapp import trigger_pr_review_from_ref
|
|
|
|
|
|
def request_pr_review(pr_url: str) -> dict[str, Any]:
|
|
"""Start the reviewer agent for a GitHub pull request URL."""
|
|
pr_ref = parse_github_pr_url(pr_url)
|
|
if not pr_ref:
|
|
return {
|
|
"success": False,
|
|
"error": "Expected a GitHub PR URL like https://github.com/OWNER/REPO/pull/NUMBER",
|
|
}
|
|
|
|
return asyncio.run(trigger_pr_review_from_ref(pr_ref, source="slack"))
|