feat(config): enhance ignore_pr_authors to support regex patterns

This commit is contained in:
mrT23
2025-07-20 11:56:55 +03:00
parent 7251e6df96
commit f42dc28a55
4 changed files with 4 additions and 4 deletions

View File

@ -139,7 +139,7 @@ def should_process_pr_logic(data) -> bool:
# logic to ignore PRs from specific users
ignore_pr_users = get_settings().get("CONFIG.IGNORE_PR_AUTHORS", [])
if ignore_pr_users and sender:
if sender in ignore_pr_users:
if any(re.search(regex, sender) for regex in ignore_pr_users):
get_logger().info(f"Ignoring PR from user '{sender}' due to 'config.ignore_pr_authors' setting")
return False

View File

@ -270,7 +270,7 @@ def should_process_pr_logic(body) -> bool:
# logic to ignore PRs from specific users
ignore_pr_users = get_settings().get("CONFIG.IGNORE_PR_AUTHORS", [])
if ignore_pr_users and sender:
if sender in ignore_pr_users:
if any(re.search(regex, sender) for regex in ignore_pr_users):
get_logger().info(f"Ignoring PR from user '{sender}' due to 'config.ignore_pr_authors' setting")
return False

View File

@ -125,7 +125,7 @@ def should_process_pr_logic(data) -> bool:
# logic to ignore PRs from specific users
ignore_pr_users = get_settings().get("CONFIG.IGNORE_PR_AUTHORS", [])
if ignore_pr_users and sender:
if sender in ignore_pr_users:
if any(re.search(regex, sender) for regex in ignore_pr_users):
get_logger().info(f"Ignoring PR from user '{sender}' due to 'config.ignore_pr_authors' settings")
return False