[web-master] main: More formatting tweaks
| From: | Nikita Popov | Date: | Sun, 05 Dec 2021 15:16:40 +0000 |
| Subject: | [web-master] main: More formatting tweaks | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-29800@lists.php.net to get a copy of this message | ||
Author: Nikita Popov (nikic)
Date: 2021-12-05T16:17:17+01:00
Commit: https://github.com/php/web-master/commit/78b0ad93ee5832257c7aaa499d4f562c1d18dfb5
Raw diff: https://github.com/php/web-master/commit/78b0ad93ee5832257c7aaa499d4f562c1d18dfb5.diff
More formatting tweaks
Changed paths:
M public/github-webhook.php
Diff:
diff --git a/public/github-webhook.php b/public/github-webhook.php
index 85eb594..36a5e70 100644
--- a/public/github-webhook.php
+++ b/public/github-webhook.php
@@ -341,25 +341,24 @@ function handle_push_mail($payload) {
$htmlUrl = $issue->html_url;
$description = $issue->body;
- $username = $issue->user->login;
+ $username = $payload->sender->login;
$isPR = is_pr($issue);
$to = get_issue_mailing_list($repoName, $isPR);
$subject = prep_title($issue, $repoName);
$type = $isPR ? 'Pull Request' : 'Issue';
- $message = sprintf("%s: %s", $type, $htmlUrl);
+ $message = sprintf("%s: %s\r\n", $type, $htmlUrl);
switch ($action) {
case 'opened':
$message .= sprintf(
- "\r\n\r\nOpened By: %s\r\n%s Description:\r\n%s",
- $username, $type, $description);
+ "Author: %s\r\n\r\n%s", $username, $description);
break;
case 'closed':
- $message .= "\r\n\r\nClosed.";
+ $message .= "\r\nClosed by $username.";
break;
case 'reopened':
- $message .= "\r\n\r\nReopened.";
+ $message .= "\r\nReopened by $username.";
break;
case 'assigned':
case 'unassigned':
@@ -390,10 +389,10 @@ function handle_push_mail($payload) {
$subject = prep_title($issue, $repoName);
$type = $isPR ? 'Pull Request' : 'Issue';
- $message = sprintf("%s: %s", $type, $htmlUrl);
+ $message = sprintf("%s: %s\r\n", $type, $htmlUrl);
switch ($action) {
case 'created':
- $message .= sprintf("\r\n\r\nComment by %s:\r\n%s", $username, $comment);
+ $message .= sprintf("Comment Author: %s\r\n\r\n%s", $username, $comment);
break;
case 'edited':
case 'deleted':