Skip to content

Normalize email alert recipients#2307

Open
KristopherKubicki wants to merge 1 commit intostagingfrom
codex/normalize-email-recipients-in-send_email_alert
Open

Normalize email alert recipients#2307
KristopherKubicki wants to merge 1 commit intostagingfrom
codex/normalize-email-recipients-in-send_email_alert

Conversation

@KristopherKubicki
Copy link
Owner

Summary

  • strip and filter configured email recipients before sending alerts
  • cover recipient normalization and missing-recipient handling in email alert tests

Testing

  • flake8 app/utils/email_alerts.py tests/test_email_alerts.py
  • pytest -n0 tests/test_email_alerts.py

Codex Task

Copilot AI review requested due to automatic review settings November 14, 2025 04:26
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 14, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/normalize-email-recipients-in-send_email_alert

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances email alert recipient handling by normalizing the configured recipient list before sending alerts. The implementation strips whitespace from each email address and filters out any empty values that may result from trailing commas or consecutive delimiters.

  • Normalizes email recipients by stripping whitespace and filtering empty strings
  • Adds validation to prevent sending emails when no valid recipients remain after normalization
  • Comprehensive test coverage for recipient normalization and missing recipient scenarios

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
app/utils/email_alerts.py Implements recipient normalization logic and adds validation to handle empty recipient lists
tests/test_email_alerts.py Updates existing test with whitespace/empty values, adds new test for no valid recipients scenario, and verifies "To:" header formatting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

Stale pull request message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants