mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 21:00:40 +08:00
feat: Apply repo settings on push trigger in github_app.py
This commit is contained in:
@ -125,11 +125,15 @@ async def handle_request(body: Dict[str, Any], event: str):
|
|||||||
await _perform_commands("pr_commands", agent, body, api_url, log_context)
|
await _perform_commands("pr_commands", agent, body, api_url, log_context)
|
||||||
|
|
||||||
# handle pull_request event with synchronize action - "push trigger" for new commits
|
# handle pull_request event with synchronize action - "push trigger" for new commits
|
||||||
elif event == 'pull_request' and action == 'synchronize' and get_settings().github_app.handle_push_trigger:
|
elif event == 'pull_request' and action == 'synchronize':
|
||||||
pull_request, api_url = _check_pull_request_event(action, body, log_context, bot_user)
|
pull_request, api_url = _check_pull_request_event(action, body, log_context, bot_user)
|
||||||
if not (pull_request and api_url):
|
if not (pull_request and api_url):
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
apply_repo_settings(api_url)
|
||||||
|
if not get_settings().github_app.handle_push_trigger:
|
||||||
|
return {}
|
||||||
|
|
||||||
# TODO: do we still want to get the list of commits to filter bot/merge commits?
|
# TODO: do we still want to get the list of commits to filter bot/merge commits?
|
||||||
before_sha = body.get("before")
|
before_sha = body.get("before")
|
||||||
after_sha = body.get("after")
|
after_sha = body.get("after")
|
||||||
|
Reference in New Issue
Block a user