com karma: check only branch changes in bugsweb: lib/Git/BugsWebPostReceiveHook.php
| From: | Alexander Moskaliov | Date: | Fri, 23 Mar 2012 07:16:47 +0000 |
| Subject: | com karma: check only branch changes in bugsweb: lib/Git/BugsWebPostReceiveHook.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-68165@lists.php.net to get a copy of this message | ||
Commit: b2c216852c420a55da06830e3d80759961875815
Author: Alexander Moskaliov <irker@php.net> Fri, 23 Mar 2012 11:16:47 +0400
Parents: aa1ceee7c98d64e501f93ccc789314d795a6afee
Branches: master
Link: http://git.php.net/?p=karma.git;a=commitdiff;h=b2c216852c420a55da06830e3d80759961875815
Log:
check only branch changes in bugsweb
Changed paths:
M lib/Git/BugsWebPostReceiveHook.php
Diff:
b2c216852c420a55da06830e3d80759961875815
diff --git a/lib/Git/BugsWebPostReceiveHook.php b/lib/Git/BugsWebPostReceiveHook.php
index fb0feac..fa4ebb7 100644
--- a/lib/Git/BugsWebPostReceiveHook.php
+++ b/lib/Git/BugsWebPostReceiveHook.php
@@ -8,11 +8,12 @@ class BugsWebPostReceiveHook extends ReceiveHook
{
$this->hookInput();
- $paths = array_map(
- function ($input) {
- return $this->getReceivedMessagesForRange($input['old'],
$input['new']);
- },
- $this->refs);
+ $paths = [];
+ foreach ($this->refs as $ref) {
+ if ($ref['reftype'] == self::REF_BRANCH) {
+ $paths[] = $this->getReceivedMessagesForRange($ref['old'],
$ref['new']);
+ }
+ }
/* remove empty lines, and flattern the array */
$flattend = array_reduce($paths, 'array_merge', []);