mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2025-01-10 17:24:39 +00:00
allow non cms like structurs
This commit is contained in:
parent
f7e8fb87ae
commit
e72b6501d1
@ -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,9 +94,19 @@ 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,
|
||||
'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);
|
||||
|
@ -18,6 +18,7 @@
|
||||
<option value="joomla:joomla-cms">COM_PATCHTESTER_FIELD_REPOSITORY_OPTION_JOOMLA_CMS</option>
|
||||
<option value="joomla-extensions:patchtester">COM_PATCHTESTER_FIELD_REPOSITORY_OPTION_PATCHTESTER</option>
|
||||
<option value="joomla-extensions:install-from-web-client">COM_PATCHTESTER_FIELD_REPOSITORY_OPTION_INSTALL_FROM_WEB</option>
|
||||
<option value="joomla-extensions:weblinks">COM_PATCHTESTER_FIELD_REPOSITORY_OPTION_WEBLINKS</option>
|
||||
<option value="custom">COM_PATCHTESTER_FIELD_REPOSITORY_CUSTOM</option>
|
||||
</field>
|
||||
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user