mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 04:40:38 +08:00
ignore bot pr option on github app mode
This commit is contained in:
@ -121,6 +121,12 @@ async def handle_new_pr_opened(body: Dict[str, Any],
|
|||||||
action: str,
|
action: str,
|
||||||
log_context: Dict[str, Any],
|
log_context: Dict[str, Any],
|
||||||
agent: PRAgent):
|
agent: PRAgent):
|
||||||
|
# logic to ignore PRs opened by bot
|
||||||
|
if get_settings().get("GITHUB_APP.IGNORE_BOT_PR", False):
|
||||||
|
if re.match('.+\[bot]$', sender) is not None:
|
||||||
|
get_logger().info(f"Ignoring PR by sender '{sender}' due to github_app.ignore_bot_pr setting")
|
||||||
|
return {}
|
||||||
|
|
||||||
title = body.get("pull_request", {}).get("title", "")
|
title = body.get("pull_request", {}).get("title", "")
|
||||||
|
|
||||||
# logic to ignore PRs with specific titles (e.g. "[Auto] ...")
|
# logic to ignore PRs with specific titles (e.g. "[Auto] ...")
|
||||||
|
@ -155,6 +155,7 @@ push_commands = [
|
|||||||
"/review --pr_reviewer.num_code_suggestions=0",
|
"/review --pr_reviewer.num_code_suggestions=0",
|
||||||
]
|
]
|
||||||
ignore_pr_title = []
|
ignore_pr_title = []
|
||||||
|
ignore_bot_pr = false
|
||||||
|
|
||||||
[gitlab]
|
[gitlab]
|
||||||
url = "https://gitlab.com" # URL to the gitlab service
|
url = "https://gitlab.com" # URL to the gitlab service
|
||||||
|
Reference in New Issue
Block a user