diff --git a/administrator/components/com_patchtester/PatchTester/Model/PullModel.php b/administrator/components/com_patchtester/PatchTester/Model/PullModel.php
index 175dd5f..202f255 100644
--- a/administrator/components/com_patchtester/PatchTester/Model/PullModel.php
+++ b/administrator/components/com_patchtester/PatchTester/Model/PullModel.php
@@ -26,7 +26,13 @@ class PullModel extends \JModelDatabase
* @var array
* @since 2.0
*/
- protected $nonProductionFolders = array('build', 'docs', 'installation', 'tests', '.github');
+ protected $nonProductionFolders = array(
+ 'build',
+ 'docs',
+ 'installation',
+ 'tests',
+ '.github',
+ );
/**
* Array containing non-production files
@@ -44,6 +50,14 @@ class PullModel extends \JModelDatabase
'phpunit.xml.dist',
'robots.txt.dist',
'travisci-phpunit.xml',
+ 'LICENSE',
+ 'RoboFile.dist.ini',
+ 'RoboFile.php',
+ 'codeception.yml',
+ 'jorobo.dist.ini',
+ 'manifest.xml',
+ 'crowdin.yaml',
+ 'travis-lang-update.sh',
);
/**
@@ -80,10 +94,20 @@ class PullModel extends \JModelDatabase
}
}
+ // Remove the `src` here to match the CMS paths if needed
+ $repofilename = $file->filename;
+ $filePath = explode('/', $repofilename);
+
+ if ($filePath[0] === 'src')
+ {
+ $repofilename = str_replace('src/', '', $file->filename);
+ }
+
$parsedFiles[] = (object) array(
- 'action' => $file->status,
- 'filename' => $file->filename,
- 'fileurl' => $file->contents_url,
+ 'action' => $file->status,
+ 'filename' => $file->filename,
+ 'repofilename' => $repofilename,
+ 'fileurl' => $file->contents_url,
);
}
@@ -178,7 +202,7 @@ class PullModel extends \JModelDatabase
try
{
$contentsResponse = $github->getFileContents(
- $pull->head->user->login, $this->getState()->get('github_repo'), $file->filename, urlencode($pull->head->ref)
+ $pull->head->user->login, $this->getState()->get('github_repo'), $file->repofilename, urlencode($pull->head->ref)
);
$contents = json_decode($contentsResponse->body);
diff --git a/administrator/components/com_patchtester/config.xml b/administrator/components/com_patchtester/config.xml
index 1b928df..d45b607 100644
--- a/administrator/components/com_patchtester/config.xml
+++ b/administrator/components/com_patchtester/config.xml
@@ -18,6 +18,7 @@
+
diff --git a/administrator/components/com_patchtester/language/en-GB/en-GB.com_patchtester.ini b/administrator/components/com_patchtester/language/en-GB/en-GB.com_patchtester.ini
index 285323f..fa6a57b 100644
--- a/administrator/components/com_patchtester/language/en-GB/en-GB.com_patchtester.ini
+++ b/administrator/components/com_patchtester/language/en-GB/en-GB.com_patchtester.ini
@@ -53,6 +53,7 @@ COM_PATCHTESTER_FIELD_REPOSITORY_LABEL="GitHub Repository"
COM_PATCHTESTER_FIELD_REPOSITORY_OPTION_JOOMLA_CMS="Joomla! CMS"
COM_PATCHTESTER_FIELD_REPOSITORY_OPTION_PATCHTESTER="Joomla! Patch Tester Component"
COM_PATCHTESTER_FIELD_REPOSITORY_OPTION_INSTALL_FROM_WEB="Joomla! Install From Web Plugin"
+COM_PATCHTESTER_FIELD_REPOSITORY_OPTION_WEBLINKS="Joomla! Weblinks Package"
COM_PATCHTESTER_FIELD_REPOSITORY_CUSTOM="Custom"
COM_PATCHTESTER_FIELDSET_REPOSITORIES_DESC="Configuration Values for GitHub Repository"
COM_PATCHTESTER_FIELDSET_REPOSITORIES_LABEL="GitHub Repository"