diff --git a/agent/webapp.py b/agent/webapp.py index 894fc9f3..7a21085e 100644 --- a/agent/webapp.py +++ b/agent/webapp.py @@ -2445,8 +2445,8 @@ async def github_webhook(request: Request, background_tasks: BackgroundTasks) -> if event_type in _GH_CI_EVENTS: if not is_failing_ci_payload(payload, event_type): return {"status": "ignored", "reason": "CI event is not a completed failure"} - if not await _is_repo_enabled_for_review(webhook_repo_config): - return {"status": "ignored", "reason": "Repository not enabled for review"} + if not await _is_repo_auto_review_enabled(webhook_repo_config): + return {"status": "ignored", "reason": "Automatic review disabled for repository"} logger.info("Accepted GitHub %s webhook, scheduling CI auto-fix evaluation", event_type) background_tasks.add_task(process_github_ci_event, payload, event_type) return {"status": "accepted", "message": f"Processing GitHub {event_type} for auto-fix"} @@ -2501,8 +2501,8 @@ async def github_webhook(request: Request, background_tasks: BackgroundTasks) -> } autofix_command = _parse_autofix_command(comment_body) if autofix_command is not None and is_pr_related_comment: - if not await _is_repo_enabled_for_review(webhook_repo_config): - return {"status": "ignored", "reason": "Repository not enabled for review"} + if not await _is_repo_auto_review_enabled(webhook_repo_config): + return {"status": "ignored", "reason": "Automatic review disabled for repository"} gate_rejection = await _enforce_public_repo_org_gate(payload, event_type) if gate_rejection is not None: return gate_rejection @@ -2522,9 +2522,9 @@ async def github_webhook(request: Request, background_tasks: BackgroundTasks) -> return {"status": "accepted", "message": "Processing review finding reply"} if not any(tag in comment_body.lower() for tag in OPEN_SWE_TAGS): - if _is_actionable_review_payload(payload, event_type) and await _is_repo_enabled_for_review( - webhook_repo_config - ): + if _is_actionable_review_payload( + payload, event_type + ) and await _is_repo_auto_review_enabled(webhook_repo_config): gate_rejection = await _enforce_public_repo_org_gate(payload, event_type) if gate_rejection is not None: return gate_rejection