com karma: - Request automatic bug report closing when refering to bug as "Fix(ed)? (bug)? #NNN": hooks/commit- bugs.php
| From: | Felipe Pena | Date: | Sat, 08 Sep 2012 17:50:19 +0000 |
| Subject: | com karma: - Request automatic bug report closing when refering to bug as "Fix(ed)? (bug)? #NNN": hooks/commit- bugs.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70134@lists.php.net to get a copy of this message | ||
Commit: 8aae7e02344616d162d44aa6e8829a374f0ed3e4
Author: Felipe Pena <felipensp@gmail.com> Sat, 8 Sep 2012 14:50:19 -0300
Parents: 3f9aeb02ef1bde0d2f3c25c3a297bb872964c99a
Branches: master
Link: http://git.php.net/?p=karma.git;a=commitdiff;h=8aae7e02344616d162d44aa6e8829a374f0ed3e4
Log:
- Request automatic bug report closing when refering to bug as "Fix(ed)? (bug)? #NNN"
Changed paths:
M hooks/commit-bugs.php
Diff:
diff --git a/hooks/commit-bugs.php b/hooks/commit-bugs.php
index 0995822..6b6366c 100644
--- a/hooks/commit-bugs.php
+++ b/hooks/commit-bugs.php
@@ -69,6 +69,12 @@ foreach ($bug_list as $k => $bug) {
'ncomment' => $comment,
'MAGIC_COOKIE' => $SVN_MAGIC_COOKIE,
);
+
+ if (preg_match('/Fix(?:ed)?\s*(?:bug\s*)?#'. $bug['number']
..'\b/i', $commit_info['log_message'])) {
+ /* Request the automatic closing of the bug report */
+ $postdata['status'] = 'Closed';
+ }
+
if ($is_DEBUG) {
unset($postdata['ncomment']);
$postdata['getbug'] = 1;