mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 21:30:40 +08:00
Add ignore_repositories config for PR filtering
What Changed? * Added support to ignore PRs/MRs from specific repositories in GitHub, Bitbucket, and GitLab webhook logic * Updated configuration.toml to include ignore_repositories option * Added unit tests for ignore_repositories across all supported providers
This commit is contained in:
@ -103,6 +103,14 @@ def should_process_pr_logic(data) -> bool:
|
||||
return False
|
||||
title = data['object_attributes'].get('title')
|
||||
sender = data.get("user", {}).get("username", "")
|
||||
repo_full_name = data.get('project', {}).get('path_with_namespace', "")
|
||||
|
||||
# logic to ignore PRs from specific repositories
|
||||
ignore_repos = get_settings().get("CONFIG.IGNORE_REPOSITORIES", [])
|
||||
if ignore_repos and repo_full_name:
|
||||
if repo_full_name in ignore_repos:
|
||||
get_logger().info(f"Ignoring MR from repository '{repo_full_name}' due to 'config.ignore_repositories' setting")
|
||||
return False
|
||||
|
||||
# logic to ignore PRs from specific users
|
||||
ignore_pr_users = get_settings().get("CONFIG.IGNORE_PR_AUTHORS", [])
|
||||
|
Reference in New Issue
Block a user