svn: SVNROOT/ commit-email.php

From: Date: Fri, 17 Jul 2009 23:47:14 +0000
Subject: svn: SVNROOT/ commit-email.php
Groups: php.cvs svn.migration 
Request: Send a blank email to php-cvs+get-59564@lists.php.net to get a copy of this message
rasmus Fri, 17 Jul 2009 23:47:14 +0000 URL: http://svn.php.net/viewvc?view=revision&revision=284287 Changed paths: U SVNROOT/commit-email.php Log: Extract urls from various bug 1234, bug1234, bug#1234 combinations in the commit log and add them to the URL section Modified: SVNROOT/commit-email.php =================================================================== --- SVNROOT/commit-email.php 2009-07-17 22:46:54 UTC (rev 284286) +++ SVNROOT/commit-email.php 2009-07-17 23:47:14 UTC (rev 284287) @@ -121,6 +121,8 @@ $commit_user = trim($commit_info[0]); $commit_date = strtotime(substr($commit_info[1], 0, strlen("0000-00-00 00:00:00 +0000"))); $commit_log = implode("\n", array_slice($commit_info, 3)); +// Support bug#1234 bug url extraction +$bugs = preg_match_all("/bug[\\s#]*([0-9]+)/i", $commit_log, $bugs_array); // ----------------------------------------------------------------------------------------------------------------------------- // Determine "from" address @@ -200,6 +202,13 @@ "MIME-Version: 1.0\r\n" . "Content-Type: multipart/mixed; boundary=\"{$boundary}\"\r\n"; +$bugs_body = ''; +if ($bugs) { + foreach ($bugs_array[1] as $bug_id) { + $bugs_body .= " http://bugs.php.net/$bug_id\r\n"; + } +} + $msg_body = "--{$boundary}\r\n" . "Content-Type: text/plain; charset=\"utf-8\"\r\n" . "Content-Transfer-Encoding: 8bit\r\n" . @@ -207,6 +216,7 @@ "{$commit_user}\t\t" . date(DATE_RFC2822, $commit_date) . "\r\n" . "\r\n" . "URL: http://svn.php.net/viewvc?view=revision&revision={$REV}\r\n" . + $bugs_body . "\r\n" . "Changed paths:\r\n" . "\t" . implode("\r\n\t", $changed_paths) . "\r\n" .

« previous php.cvs (#59564) next »