@@ -26,7 +26,13 @@ class PullModel extends \JModelDatabase
2626 * @var array
2727 * @since 2.0
2828 */
29- protected $ nonProductionFolders = array ('build ' , 'docs ' , 'installation ' , 'tests ' , '.github ' );
29+ protected $ nonProductionFolders = array (
30+ 'build ' ,
31+ 'docs ' ,
32+ 'installation ' ,
33+ 'tests ' ,
34+ '.github ' ,
35+ );
3036
3137 /**
3238 * Array containing non-production files
@@ -44,6 +50,14 @@ class PullModel extends \JModelDatabase
4450 'phpunit.xml.dist ' ,
4551 'robots.txt.dist ' ,
4652 'travisci-phpunit.xml ' ,
53+ 'LICENSE ' ,
54+ 'RoboFile.dist.ini ' ,
55+ 'RoboFile.php ' ,
56+ 'codeception.yml ' ,
57+ 'jorobo.dist.ini ' ,
58+ 'manifest.xml ' ,
59+ 'crowdin.yaml ' ,
60+ 'travis-lang-update.sh ' ,
4761 );
4862
4963 /**
@@ -80,10 +94,20 @@ protected function parseFileList($files)
8094 }
8195 }
8296
97+ // Remove the `src` here to match the CMS paths if needed
98+ $ repofilename = $ file ->filename ;
99+ $ filePath = explode ('/ ' , $ repofilename );
100+
101+ if ($ filePath [0 ] === 'src ' )
102+ {
103+ $ repofilename = str_replace ('src/ ' , '' , $ file ->filename );
104+ }
105+
83106 $ parsedFiles [] = (object ) array (
84- 'action ' => $ file ->status ,
85- 'filename ' => $ file ->filename ,
86- 'fileurl ' => $ file ->contents_url ,
107+ 'action ' => $ file ->status ,
108+ 'filename ' => $ file ->filename ,
109+ 'repofilename ' => $ repofilename ,
110+ 'fileurl ' => $ file ->contents_url ,
87111 );
88112 }
89113
@@ -178,7 +202,7 @@ public function apply($id)
178202 try
179203 {
180204 $ contentsResponse = $ github ->getFileContents (
181- $ pull ->head ->user ->login , $ this ->getState ()->get ('github_repo ' ), $ file ->filename , urlencode ($ pull ->head ->ref )
205+ $ pull ->head ->user ->login , $ this ->getState ()->get ('github_repo ' ), $ file ->repofilename , urlencode ($ pull ->head ->ref )
182206 );
183207
184208 $ contents = json_decode ($ contentsResponse ->body );
0 commit comments