From 832f0df38ccb1dbfe718a6f1306b411f0a08781a Mon Sep 17 00:00:00 2001 From: zero-24 Date: Sun, 27 Mar 2016 11:59:48 +0200 Subject: [PATCH] Fixes https://github.com/joomla-extensions/patchtester/issues/132 --- .../PatchTester/Model/PullModel.php | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/administrator/components/com_patchtester/PatchTester/Model/PullModel.php b/administrator/components/com_patchtester/PatchTester/Model/PullModel.php index 51a8154..945af12 100644 --- a/administrator/components/com_patchtester/PatchTester/Model/PullModel.php +++ b/administrator/components/com_patchtester/PatchTester/Model/PullModel.php @@ -25,7 +25,25 @@ class PullModel extends \JModelDatabase * @var array * @since 2.0 */ - protected $nonProductionFolders = array('build', 'docs', 'installation', 'tests'); + protected $nonProductionFolders = array('build', 'docs', 'installation', 'tests', '.github'); + + /** + * Array containing non-production files + * + * @var array + * @since 2.0 + */ + protected $nonProductionFiles = array( + '.gitignore', + '.travis.yml', + 'README.md', + 'build.xml', + 'composer.json', + 'composer.lock', + 'phpunit.xml.dist', + 'robots.txt.dist', + 'travisci-phpunit.xml', + ); /** * Method to parse a patch and extract the affected files @@ -102,6 +120,11 @@ class PullModel extends \JModelDatabase { $filePath = explode('/', $file->new); + if (in_array($filePath[0], $this->nonProductionFiles)) + { + continue; + } + if (in_array($filePath[0], $this->nonProductionFolders)) { continue;