stable
Clone or download
Read-only
There is nothing fancy in the mail being sent for now, it is a plaintext email. Sending emails in reaction to an event is implemented through a strategy pattern [0] to make possible to deal with different ways for different events or to ease the introduction of new behaviors (for example logging received events for debugging purposes or sending webhooks). Part of story #14190: get email notifications on pull requests - first stage [0] https://en.wikipedia.org/wiki/Strategy_pattern Change-Id: I95a1da5a2208f6e0ffc6a0c7d4726809960cc6f9
Modified Files
Name | ||||
---|---|---|---|---|
A | plugins/pullrequest/include/PullRequest/Notification/EventSubjectToNotificationListener.php | +56 | −0 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/Notification/EventSubjectToNotificationListenerProvider.php | +3 | −3 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/Notification/EventSubjectToNotificationSynchronousDispatcher.php | +8 | −11 | Go to diff View file |
A | plugins/pullrequest/include/PullRequest/Notification/Strategy/PullRequestNotificationSendMail.php | +133 | −0 | Go to diff View file |
R | plugins/pullrequest/include/PullRequest/Notification/PullRequestNotificationExecutor.php | Go to diff View file | ||
M | plugins/pullrequest/include/PullRequest/REST/v1/PullRequestsResource.php | +30 | −13 | Go to diff View file |
M | plugins/pullrequest/include/PullRequest/Reference/HTMLURLBuilder.php | +14 | −2 | Go to diff View file |
M | plugins/pullrequest/phpunit/Notification/EventSubjectToNotificationListenerProviderTest.php | +11 | −4 | Go to diff View file |
A | plugins/pullrequest/phpunit/Notification/EventSubjectToNotificationListenerTest.php | +46 | −0 | Go to diff View file |
M | plugins/pullrequest/phpunit/Notification/EventSubjectToNotificationSynchronousDispatcherTest.php | +15 | −22 | Go to diff View file |
D | plugins/pullrequest/phpunit/Notification/PullRequestNotificationExecutorTest.php | +0 | −69 | Go to diff View file |
A | plugins/pullrequest/phpunit/Notification/Strategy/PullRequestNotificationSendMailTest.php | +185 | −0 | Go to diff View file |
M | plugins/pullrequest/phpunit/Reference/HTMLURLBuilderTest.php | +44 | −12 | Go to diff View file |