[web-master] main: Don't send mail if no mailing list specified

From: Date: Sun, 05 Dec 2021 15:23:15 +0000
Subject: [web-master] main: Don't send mail if no mailing list specified
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-29801@lists.php.net to get a copy of this message
Author: Nikita Popov (nikic) Date: 2021-12-05T16:23:41+01:00 Commit: https://github.com/php/web-master/commit/5b065910a3df1f78bb1428bdd6d415013e85a3b0 Raw diff: https://github.com/php/web-master/commit/5b065910a3df1f78bb1428bdd6d415013e85a3b0.diff Don't send mail if no mailing list specified Changed paths: M public/github-webhook.php Diff: diff --git a/public/github-webhook.php b/public/github-webhook.php index 36a5e70..491d2b4 100644 --- a/public/github-webhook.php +++ b/public/github-webhook.php @@ -345,6 +345,11 @@ function handle_push_mail($payload) { $isPR = is_pr($issue); $to = get_issue_mailing_list($repoName, $isPR); + if ($to === null) { + echo "Not sending mail for $repoName (no mailing list)"; + return; + } + $subject = prep_title($issue, $repoName); $type = $isPR ? 'Pull Request' : 'Issue'; @@ -386,6 +391,11 @@ function handle_push_mail($payload) { $isPR = is_pr($issue); $to = get_issue_mailing_list($repoName, $isPR); + if ($to === null) { + echo "Not sending mail for $repoName (no mailing list)"; + return; + } + $subject = prep_title($issue, $repoName); $type = $isPR ? 'Pull Request' : 'Issue';

« previous php.webmaster (#29801) next »