diff --git a/administrator/components/com_patchtester/PatchTester/Controller/ResetController.php b/administrator/components/com_patchtester/PatchTester/Controller/ResetController.php index 7bb551fc..334f750b 100644 --- a/administrator/components/com_patchtester/PatchTester/Controller/ResetController.php +++ b/administrator/components/com_patchtester/PatchTester/Controller/ResetController.php @@ -42,43 +42,61 @@ public function execute() $testsModel = new TestsModel(null, Factory::getDbo()); // Check the applied patches in the database first - $appliedPatches = $testsModel->getAppliedPatches(); + $appliedPatches = $pullModel->getPatchesDividedInProcs(); - if (count($appliedPatches)) + if (count($appliedPatches['git'])) { $revertErrored = false; // Let's try to cleanly revert all applied patches - foreach ($appliedPatches as $patch) + foreach ($appliedPatches['git'] as $patch) { try { - $pullModel->revert($patch->id); + $pullModel->revertWithGitHub($patch->id); } catch (\RuntimeException $e) { $revertErrored = true; } } + } - // If we errored out reverting patches, we'll need to truncate the table - if ($revertErrored) + if (count($appliedPatches['ci'])) + { + $revertErrored = false; + + // Let's try to cleanly revert all applied patches with ci + foreach ($appliedPatches['ci'] as $patch) { try { - $testsModel->truncateTable(); + $pullModel->revertWithCIServer($patch->insert_id); } catch (\RuntimeException $e) { - $hasErrors = true; - - $this->getApplication()->enqueueMessage( - Text::sprintf('COM_PATCHTESTER_ERROR_TRUNCATING_PULLS_TABLE', $e->getMessage()), 'error' - ); + $revertErrored = true; } } } + // If we errored out reverting patches, we'll need to truncate the table + if ($revertErrored) + { + try + { + $testsModel->truncateTable(); + } + catch (\RuntimeException $e) + { + $hasErrors = true; + + $this->getApplication()->enqueueMessage( + Text::sprintf('COM_PATCHTESTER_ERROR_TRUNCATING_PULLS_TABLE', $e->getMessage()), 'error' + ); + } + } + // Now truncate the pulls table try { diff --git a/administrator/components/com_patchtester/PatchTester/Helper.php b/administrator/components/com_patchtester/PatchTester/Helper.php index ddf2312c..80e18531 100644 --- a/administrator/components/com_patchtester/PatchTester/Helper.php +++ b/administrator/components/com_patchtester/PatchTester/Helper.php @@ -62,4 +62,34 @@ public static function initializeGithub() return new GitHub($options); } + + /** + * Initializes the CI Settings + * + * @return Registry + * + * @since 3.0 + */ + public static function initializeCISettings() + { + $params = ComponentHelper::getParams('com_patchtester'); + + $options = new Registry; + + // Set CI server address for the request + $options->set('server.url', $params->get('ci_server', 'https://ci.joomla.org:444')); + + // Set name of the zip archive + $options->set('zip.name', 'build.zip'); + $options->set('zip.log.name', 'deleted_files.log'); + + // Set temp archive for extracting and downloading files + $options->set('folder.temp', Factory::getConfig()->get('tmp_path')); + $options->set('folder.backups', JPATH_COMPONENT . '/backups'); + + // Set full url for addressing the file + $options->set('zip.url', $options->get('server.url') . '/artifacts/joomla/joomla-cms/4.0-dev/%s/patchtester/' . $options->get('zip.name')); + + return $options; + } } diff --git a/administrator/components/com_patchtester/PatchTester/Model/PullModel.php b/administrator/components/com_patchtester/PatchTester/Model/PullModel.php index 28360f3e..4848ca25 100644 --- a/administrator/components/com_patchtester/PatchTester/Model/PullModel.php +++ b/administrator/components/com_patchtester/PatchTester/Model/PullModel.php @@ -8,12 +8,17 @@ namespace PatchTester\Model; +use Joomla\Archive\Zip; +use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Factory; use Joomla\CMS\Filesystem\Path; +use Joomla\CMS\Http\Response; use Joomla\CMS\Language\Text; use Joomla\CMS\Version; use Joomla\Filesystem\File; +use Joomla\Filesystem\Folder; use PatchTester\GitHub\Exception\UnexpectedResponse; +use PatchTester\GitHub\GitHub; use PatchTester\Helper; /** @@ -136,47 +141,209 @@ protected function parseFileList($files) /** * Patches the code with the supplied pull request + * However uses different methods for different repositories. * * @param integer $id ID of the pull request to apply * * @return boolean * - * @since 2.0 + * @since 3.0 + * * @throws \RuntimeException */ public function apply($id) { + $params = ComponentHelper::getParams('com_patchtester'); + + // Decide based on repository settings whether patch will be applied through Github or CIServer + if (version_compare(JVERSION, "4", "ge") && (bool) $params->get('ci_switch', 1)) + { + return $this->applyWithCIServer($id); + } + else + { + return $this->applyWithGitHub($id); + } + } + + /** + * Patches the code with the supplied pull request + * + * @param integer $id ID of the pull request to apply + * + * @return boolean + * + * @since 3.0 + * + * @throws \RuntimeException + */ + private function applyWithCIServer($id) + { + // Get the CIServer Registry + $ciSettings = Helper::initializeCISettings(); + // Get the Github object $github = Helper::initializeGithub(); + // Retrieve pullData for sha later on. try { - $rateResponse = $github->getRateLimit(); - $rate = json_decode($rateResponse->body); + $pull = $this->retrieveGitHubData($github, $id); + $sha = $pull->head->sha; } - catch (UnexpectedResponse $e) + catch (\RuntimeException $e) { - throw new \RuntimeException(Text::sprintf('COM_PATCHTESTER_COULD_NOT_CONNECT_TO_GITHUB', $e->getMessage()), $e->getCode(), $e); + // Catch the Exception and continue, because the hash is not that + // necessary for applying patches + $sha = "Error:429"; } - // If over the API limit, we can't build this list - if ($rate->resources->core->remaining == 0) + // Create tmp folder if it does not exist + if (!file_exists($ciSettings->get('folder.temp'))) { - throw new \RuntimeException( - Text::sprintf('COM_PATCHTESTER_API_LIMIT_LIST', Factory::getDate($rate->resources->core->reset)) - ); + Folder::create($ciSettings->get('folder.temp')); } - try + $tempPath = $ciSettings->get('folder.temp') . "/$id"; + $backupsPath = $ciSettings->get('folder.backups') . "/$id"; + + $delLogPath = $tempPath . '/' . $ciSettings->get('zip.log.name'); + $zipPath = $tempPath . '/' . $ciSettings->get('zip.name'); + + $serverZipPath = sprintf($ciSettings->get('zip.url'), $id); + + // Patch has already been applied + if (file_exists($backupsPath)) { - $pullResponse = $github->getPullRequest($this->getState()->get('github_user'), $this->getState()->get('github_repo'), $id); - $pull = json_decode($pullResponse->body); + return false; } - catch (UnexpectedResponse $e) + + // Check if zip folder exists on server + $serverHeaders = @get_headers($serverZipPath); + + if (!$serverHeaders || $serverHeaders[0] != 'HTTP/1.1 200 OK') { - throw new \RuntimeException(Text::sprintf('COM_PATCHTESTER_COULD_NOT_CONNECT_TO_GITHUB', $e->getMessage()), $e->getCode(), $e); + throw new \RuntimeException(Text::_('COM_PATCHTESTER_SERVER_RESPONDED_NOT_200')); } + Folder::create($tempPath); + file_put_contents($zipPath, fopen($serverZipPath, "r")); + + // Check if zip folder could have been downloaded + if (!file_exists($zipPath)) + { + Folder::delete($tempPath); + throw new \RuntimeException(Text::_('COM_PATCHTESTER_ZIP_DOES_NOT_EXIST')); + } + + $zip = new Zip; + + if (!$zip->extract($zipPath, $tempPath)) + { + Folder::delete($tempPath); + throw new \RuntimeException(Text::_('COM_PATCHTESTER_ZIP_EXTRACT_FAILED')); + } + + // Remove zip to avoid get listing afterwards + File::delete($zipPath); + + // Get files from deleted_logs + $deletedFiles = (file($delLogPath) ? file($delLogPath) : array()); + $deletedFiles = array_map('trim', $deletedFiles); + + if (file_exists($delLogPath)) + { + // Remove deleted_logs to avoid get listing afterwards + File::delete($delLogPath); + } + + // Retrieve all files and merge them into one array + $files = Folder::files($tempPath, null, true, true); + $files = str_replace(Path::clean("$tempPath\\"), '', $files); + $files = array_merge($files, $deletedFiles); + + Folder::create($backupsPath); + + // Moves existent files to backup and replace them or creates new one if they don't exist + foreach ($files as $key => $file) + { + try + { + $filePath = explode("\\", Path::clean($file)); + array_pop($filePath); + $filePath = implode("\\", $filePath); + + // Deleted_logs returns files as well as folder, if value is folder, unset and skip + if (is_dir(JPATH_ROOT . "/$file")) + { + unset($files[$key]); + continue; + } + + if (file_exists(JPATH_ROOT . "/$file")) + { + // Create directories if they don't exist until file + if (!file_exists("$backupsPath/$filePath")) + { + Folder::create("$backupsPath/$filePath"); + } + + File::move(JPATH_ROOT . "/$file", "$backupsPath/$file"); + } + + if (file_exists("$tempPath/$file")) + { + // Create directories if they don't exist until file + if (!file_exists(JPATH_ROOT . "/$filePath") || !is_dir(JPATH_ROOT . "/$filePath")) + { + Folder::create(JPATH_ROOT . "/$filePath"); + } + + File::copy("$tempPath/$file", JPATH_ROOT . "/$file"); + } + } + catch (\RuntimeException $e) + { + Folder::delete($tempPath); + + Folder::move($backupsPath, $backupsPath . "_failed"); + throw new \RuntimeException(Text::sprintf('COM_PATCHTESTER_FAILED_APPLYING_PATCH', $file, $e->getMessage())); + } + } + + // Clear temp folder and store applied patch in database + Folder::delete($tempPath); + + $lastInserted = $this->saveAppliedPatch($id, $files, $sha); + + // Write or create patch chain for correct order of patching + $this->appendPatchChain($lastInserted, $id); + + // Change the media version + $version = new Version; + $version->refreshMediaVersion(); + + return true; + } + + /** + * Patches the code with the supplied pull request + * + * @param integer $id ID of the pull request to apply + * + * @return boolean + * + * @since 2.0 + * + * @throws \RuntimeException + */ + private function applyWithGitHub($id) + { + // Get the Github object + $github = Helper::initializeGithub(); + + $pull = $this->retrieveGitHubData($github, $id); + if (is_null($pull->head->repo)) { throw new \RuntimeException(Text::_('COM_PATCHTESTER_REPO_IS_GONE')); @@ -199,6 +366,11 @@ public function apply($id) $parsedFiles = $this->parseFileList($files); + if (!count($parsedFiles)) + { + return false; + } + foreach ($parsedFiles as $file) { switch ($file->action) @@ -314,9 +486,76 @@ public function apply($id) unset($file->body); } + $this->saveAppliedPatch($pull->number, $parsedFiles, $pull->head->sha); + + // Change the media version + $version = new Version; + $version->refreshMediaVersion(); + + return true; + } + + /** + * Patches the code with the supplied pull request + * + * @param GitHub $github github object + * @param integer $id Id of the pull request + * + * @return Response + * + * @since 2.0 + * + * @throws \RuntimeException + */ + private function retrieveGitHubData($github, $id) + { + try + { + $rateResponse = $github->getRateLimit(); + $rate = json_decode($rateResponse->body); + } + catch (UnexpectedResponse $e) + { + throw new \RuntimeException(Text::sprintf('COM_PATCHTESTER_COULD_NOT_CONNECT_TO_GITHUB', $e->getMessage()), $e->getCode(), $e); + } + + // If over the API limit, we can't build this list + if ($rate->resources->core->remaining == 0) + { + throw new \RuntimeException( + Text::sprintf('COM_PATCHTESTER_API_LIMIT_LIST', Factory::getDate($rate->resources->core->reset)) + ); + } + + try + { + $pullResponse = $github->getPullRequest($this->getState()->get('github_user'), $this->getState()->get('github_repo'), $id); + $pull = json_decode($pullResponse->body); + } + catch (UnexpectedResponse $e) + { + throw new \RuntimeException(Text::sprintf('COM_PATCHTESTER_COULD_NOT_CONNECT_TO_GITHUB', $e->getMessage()), $e->getCode(), $e); + } + + return $pull; + } + + /** + * Saves the applied patch into database + * + * @param integer $id ID of the applied pull request + * @param array $fileList List of files + * @param string $sha sha-key from pull request + * + * @return integer $id last inserted id + * + * @since 3.0 + */ + private function saveAppliedPatch($id, $fileList, $sha = null) + { $record = (object) array( - 'pull_id' => $pull->number, - 'data' => json_encode($parsedFiles), + 'pull_id' => $id, + 'data' => json_encode($fileList), 'patched_by' => Factory::getUser()->id, 'applied' => 1, 'applied_version' => JVERSION, @@ -325,24 +564,146 @@ public function apply($id) $db = $this->getDb(); $db->insertObject('#__patchtester_tests', $record); + $insertId = $db->insertid(); - // Insert the retrieved commit SHA into the pulls table for this item - $db->setQuery( - $db->getQuery(true) - ->update('#__patchtester_pulls') - ->set('sha = ' . $db->quote($pull->head->sha)) - ->where($db->quoteName('pull_id') . ' = ' . (int) $id) - )->execute(); + if (!is_null($sha)) + { + // Insert the retrieved commit SHA into the pulls table for this item + $db->setQuery( + $db->getQuery(true) + ->update('#__patchtester_pulls') + ->set('sha = ' . $db->quote($sha)) + ->where($db->quoteName('pull_id') . ' = ' . (int) $id) + )->execute(); + } + + return $insertId; + } + + /** + * Reverts the specified pull request + * However uses different methods for different repositories. + * + * @param integer $id ID of the pull request to revert + * + * @return boolean + * + * @since 3.0 + * @throws \RuntimeException + */ + public function revert($id) + { + $params = ComponentHelper::getParams('com_patchtester'); + + // Decide based on repository settings whether patch will be applied through Github or CIServer + if (version_compare(JVERSION, "4", "ge") && ((bool) $params->get('ci_switch', 1) || $id === $this->getPatchChain($id)->insert_id)) + { + return $this->revertWithCIServer($id); + } + else + { + return $this->revertWithGitHub($id); + } + } + + /** + * Reverts the specified pull request with CIServer options + * + * @param integer $id ID of the pull request to revert + * + * @return boolean + * + * @since 3.0 + * @throws \RuntimeException + */ + public function revertWithCIServer($id) + { + // Get the CIServer Registry + $ciSettings = Helper::initializeCISettings(); + + $testRecord = $this->getTestRecord($id); + + // Get PatchChain as array, remove any EOL set by php + $patchChain = $this->getPatchChain(-1); + + // Allow only reverts in order of the patch chain + if ($patchChain->insert_id != $id) + { + throw new \RuntimeException(Text::sprintf('COM_PATCHTESTER_NOT_IN_ORDER_OF_PATCHCHAIN', $patchChain->pull_id)); + } + else + { + $this->removeLastChain($patchChain->insert_id); + } + + // We don't want to restore files from an older version + if ($testRecord->applied_version != JVERSION) + { + return $this->removeTest($testRecord); + } + + $files = json_decode($testRecord->data); + + if (!$files) + { + throw new \RuntimeException(Text::sprintf('COM_PATCHTESTER_ERROR_READING_DATABASE_TABLE', __METHOD__, htmlentities($testRecord->data))); + } + + $backupsPath = $ciSettings->get('folder.backups') . "/$testRecord->pull_id"; + + foreach ($files as $file) + { + try + { + $filePath = explode("\\", $file); + array_pop($filePath); + $filePath = implode("\\", $filePath); + + // Delete file from root of it exists + if (file_Exists(JPATH_ROOT . "/$file")) + { + File::delete(JPATH_ROOT . "/$file"); + + // Move from backup, if it exists there + if (file_exists("$backupsPath/$file")) + { + File::move("$backupsPath/$file", JPATH_ROOT . "/$file"); + } + + // If folder is empty, remove it as well + if (count(glob(JPATH_ROOT . "/$filePath/*")) === 0) + { + Folder::delete(JPATH_ROOT . "/$filePath"); + } + } + // Move from backup, if file exists there - got deleted by patch + elseif (file_exists("$backupsPath/$file")) + { + if (!file_exists(JPATH_ROOT . "/$filePath")) + { + Folder::create(JPATH_ROOT . "/$filePath"); + } + + File::move("$backupsPath/$file", JPATH_ROOT . "/$file"); + } + } + catch (\RuntimeException $e) + { + throw new \RuntimeException(Text::sprintf('COM_PATCHTESTER_FAILED_REVERT_PATCH', $file, $e->getMessage())); + } + } + + Folder::delete($backupsPath); // Change the media version $version = new Version; $version->refreshMediaVersion(); - return true; + return $this->removeTest($testRecord); } /** - * Reverts the specified pull request + * Reverts the specified pull request with Github Requests * * @param integer $id ID of the pull request to revert * @@ -351,16 +712,9 @@ public function apply($id) * @since 2.0 * @throws \RuntimeException */ - public function revert($id) + public function revertWithGitHub($id) { - $db = $this->getDb(); - - $testRecord = $db->setQuery( - $db->getQuery(true) - ->select('*') - ->from('#__patchtester_tests') - ->where('id = ' . (int) $id) - )->loadObject(); + $testRecord = $this->getTestRecord($id); // We don't want to restore files from an older version if ($testRecord->applied_version != JVERSION) @@ -475,7 +829,7 @@ private function removeTest($testRecord) $db->getQuery(true) ->update('#__patchtester_pulls') ->set('sha = ' . $db->quote('')) - ->where($db->quoteName('pull_id') . ' = ' . (int) $testRecord->pull_id) + ->where($db->quoteName('id') . ' = ' . (int) $testRecord->id) )->execute(); // And delete the record from the tests table @@ -487,4 +841,152 @@ private function removeTest($testRecord) return true; } + + /** + * Retrieves test data from database by specific id + * + * @param integer $id ID of the record + * + * @return stdClass $testRecord The record looking for + * + * @since 3.0.0 + */ + private function getTestRecord($id) + { + $db = $this->getDb(); + + return $db->setQuery( + $db->getQuery(true) + ->select('*') + ->from('#__patchtester_tests') + ->where('id = ' . (int) $id) + )->loadObject(); + } + + /** + * Retrieves a list of patches in chain + * + * @return mixed + * + * @since 3.0 + */ + private function getPatchChains() + { + $db = $this->getDb(); + + $db->setQuery( + $db->getQuery(true) + ->select('*') + ->from($db->quoteName('#__patchtester_chain')) + ->order('id DESC') + ); + + return $db->loadObjectList('pull_id'); + } + + /** + * Returns a chain by specific value, returns the last + * element on $id = -1 and the first on $id = null + * + * @param integer $id specific id of a pull + * + * @return stdClass $chain last chain of the table + * + * @since 3.0.0 + */ + private function getPatchChain($id = null) + { + $db = $this->getDb(); + + $query = $db->getQuery(true) + ->select('*') + ->from('#__patchtester_chain'); + + if (!is_null($id) && $id !== -1) + { + $query = $query->where('insert_id =' . (int) $id); + } + + if ($id === -1) + { + $query = $query->order('id DESC'); + } + + if (is_null($id)) + { + $query = $query->order('id ASC'); + } + + return $db->setQuery($query, 0, 1)->loadObject(); + } + + /** + * Returns a two dimensional array with applied patches + * by the github or ci procedure + * + * @return array two-dimensional array with github patches + * and ci patches + * + * @since 3.0.0 + */ + public function getPatchesDividedInProcs() + { + $db = $this->getDb(); + + $appliedByGit = $db->setQuery( + $db->getQuery(true) + ->select('tests.id, tests.pull_id') + ->from('#__patchtester_tests tests') + ->leftJoin('#__patchtester_chain chain', 'tests.id = chain.insert_id') + ->where('chain.insert_id IS NULL') + )->loadObjectList('pull_id'); + + $appliedByCI = $this->getPatchChains(); + + return array('git' => $appliedByGit, 'ci' => $appliedByCI); + } + + /** + * Adds a value to the patch chain in the database + * + * @param integer $insertId ID of the patch in the database + * @param integer $pullId ID of the pull request + * + * @return integer $insertId last inserted element + * + * @since 3.0.0 + */ + private function appendPatchChain($insertId, $pullId) + { + $record = (object) array( + 'insert_id' => $insertId, + 'pull_id' => $pullId, + ); + + $db = $this->getDb(); + + $db->insertObject('#__patchtester_chain', $record); + + return $db->insertid(); + } + + /** + * Removes the last value of the chain + * + * @param integer $insertId ID of the patch in the database + * + * @return void + * + * @since 3.0.0 + */ + private function removeLastChain($insertId) + { + $db = $this->getDb(); + + $db->setQuery( + $db->getQuery(true) + ->delete('#__patchtester_chain') + ->where('insert_id = ' . (int) $insertId) + )->execute(); + } } diff --git a/administrator/components/com_patchtester/PatchTester/View/Fetch/tmpl/default.php b/administrator/components/com_patchtester/PatchTester/View/Fetch/tmpl/default.php index 97146d00..b2a2b8f2 100644 --- a/administrator/components/com_patchtester/PatchTester/View/Fetch/tmpl/default.php +++ b/administrator/components/com_patchtester/PatchTester/View/Fetch/tmpl/default.php @@ -21,8 +21,8 @@

-
-
+
+
diff --git a/administrator/components/com_patchtester/PatchTester/View/Pulls/tmpl/default.php b/administrator/components/com_patchtester/PatchTester/View/Pulls/tmpl/default.php index e4af427a..fb16cf8d 100644 --- a/administrator/components/com_patchtester/PatchTester/View/Pulls/tmpl/default.php +++ b/administrator/components/com_patchtester/PatchTester/View/Pulls/tmpl/default.php @@ -10,7 +10,7 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\Router\Route; -/** @var \PatchTester\View\Pulls\PullsHtmlView $this */ +/** @var \PatchTester\View\Pulls\PullsHtmlView $this */ HTMLHelper::_('behavior.core'); HTMLHelper::_('bootstrap.tooltip'); @@ -18,35 +18,47 @@ HTMLHelper::_('stylesheet', 'com_patchtester/octicons.css', array('version' => '3.5.0', 'relative' => true)); HTMLHelper::_('script', 'com_patchtester/patchtester.js', array('version' => 'auto', 'relative' => true)); -$listOrder = $this->escape($this->state->get('list.fullordering', 'a.pull_id DESC')); +$listOrder = $this->escape($this->state->get('list.fullordering', 'a.pull_id DESC')); $filterApplied = $this->escape($this->state->get('filter.applied')); -$filterBranch = $this->escape($this->state->get('filter.branch')); -$filterRtc = $this->escape($this->state->get('filter.rtc')); +$filterBranch = $this->escape($this->state->get('filter.branch')); +$filterRtc = $this->escape($this->state->get('filter.rtc')); ?> -
+
- - + +
- + pagination->getLimitBox(); ?>
- - - getSortFields(), 'value', 'text', $listOrder);?> + getSortFields(), 'value', 'text', $listOrder); ?>
- +
- +
@@ -77,46 +90,46 @@ - - - - - - - trackerAlias !== false) : ?> + + + + + + + trackerAlias !== false) : ?> - - - - + + + + - loadTemplate('items'); ?> + loadTemplate('items'); ?>
- - - - - - - - - -
+ + + + + + + + + + - - - -
+ + + +
pagination->getListFooter(); ?> - - - + + +
diff --git a/administrator/components/com_patchtester/PatchTester/View/Pulls/tmpl/default_items.php b/administrator/components/com_patchtester/PatchTester/View/Pulls/tmpl/default_items.php index 1eaa19f6..405e87af 100644 --- a/administrator/components/com_patchtester/PatchTester/View/Pulls/tmpl/default_items.php +++ b/administrator/components/com_patchtester/PatchTester/View/Pulls/tmpl/default_items.php @@ -16,58 +16,64 @@ if ($item->applied) : $status = ' class="success"'; endif; -?> -> - - pull_id; ?> - - - escape($item->title); ?> - applied) : ?> -
- sha, 0, 10)); ?> -
+ ?> + > + + pull_id; ?> + + + escape($item->title); ?> + applied) : ?> +
+ sha, 0, 10)); ?> +
+ + + + escape($item->branch); ?> + + + is_rtc) : ?> + + + + + + + + + + + trackerAlias !== false) : ?> + + + + + - - - escape($item->branch); ?> - - - is_rtc) : ?> - - - - - - - - - - - trackerAlias !== false) : ?> - - - - - - - - applied) : ?> -
- -
- - + + applied) : ?> +
+ +
+ + - - - - applied) : ?> -
- - - - - + + + + applied) : ?> + +
+ + + + +
+ name="repositories" + label="COM_PATCHTESTER_FIELDSET_REPOSITORIES_LABEL" + description="COM_PATCHTESTER_FIELDSET_REPOSITORIES_DESC" + > + name="repository" + type="list" + label="COM_PATCHTESTER_FIELD_REPOSITORY_LABEL" + description="COM_PATCHTESTER_FIELD_REPOSITORY_DESC" + default="joomla:joomla-cms" + onchange="if (jQuery(this).val() != 'custom') { var parts = jQuery(this).val().split(':'); } else { var parts = ['', '']; } document.getElementById('jform_org').value = parts[0]; document.getElementById('jform_repo').value = parts[1];" + > @@ -23,42 +23,41 @@
+ name="authentication" + label="COM_PATCHTESTER_FIELDSET_AUTHENTICATION_LABEL" + description="COM_PATCHTESTER_FIELDSET_AUTHENTICATION_DESC" + > + name="gh_auth" + type="list" + label="COM_PATCHTESTER_FIELD_GH_AUTH_LABEL" + description="COM_PATCHTESTER_FIELD_GH_AUTH_DESC" + default="" + onchange="jQuery('#jform_gh_user, #jform_gh_password, #jform_gh_token').val('');" + > @@ -66,49 +65,77 @@
+ name="ci_settings" + label="COM_PATCHTESTER_FIELDSET_CI_SETTINGS" + description="COM_PATCHTESTER_FIELDSET_CI_SETTINGS_DESC" + > + + + + + + +
+ +
+ +
diff --git a/administrator/components/com_patchtester/install/sql/mysql/install.sql b/administrator/components/com_patchtester/install/sql/mysql/install.sql index 22106540..9113485f 100644 --- a/administrator/components/com_patchtester/install/sql/mysql/install.sql +++ b/administrator/components/com_patchtester/install/sql/mysql/install.sql @@ -19,3 +19,10 @@ CREATE TABLE IF NOT EXISTS `#__patchtester_tests` ( `applied_version` varchar(25) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `#__patchtester_chain` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `insert_id` int(11) NOT NULL, + `pull_id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; diff --git a/administrator/components/com_patchtester/install/sql/mysql/uninstall.sql b/administrator/components/com_patchtester/install/sql/mysql/uninstall.sql index 3c1bf05b..8f9a6b6f 100644 --- a/administrator/components/com_patchtester/install/sql/mysql/uninstall.sql +++ b/administrator/components/com_patchtester/install/sql/mysql/uninstall.sql @@ -1,2 +1,3 @@ DROP TABLE IF EXISTS `#__patchtester_pulls`; DROP TABLE IF EXISTS `#__patchtester_tests`; +DROP TABLE IF EXISTS `#__patchtester_chain`; diff --git a/administrator/components/com_patchtester/install/sql/postgresql/install.sql b/administrator/components/com_patchtester/install/sql/postgresql/install.sql index 45c96ad6..d073978e 100644 --- a/administrator/components/com_patchtester/install/sql/postgresql/install.sql +++ b/administrator/components/com_patchtester/install/sql/postgresql/install.sql @@ -19,3 +19,10 @@ CREATE TABLE IF NOT EXISTS "#__patchtester_tests" ( "applied_version" character varying(25) NOT NULL, PRIMARY KEY ("id") ); + +CREATE TABLE IF NOT EXISTS "#__patchtester_chain" ( + "id" serial NOT NULL, + "insert_id" bigint NOT NULL, + "pull_id" bigint NOT NULL, + PRIMARY KEY ("id") +); diff --git a/administrator/components/com_patchtester/install/sql/postgresql/uninstall.sql b/administrator/components/com_patchtester/install/sql/postgresql/uninstall.sql index 9fcc3f67..a972c22e 100644 --- a/administrator/components/com_patchtester/install/sql/postgresql/uninstall.sql +++ b/administrator/components/com_patchtester/install/sql/postgresql/uninstall.sql @@ -1,2 +1,3 @@ DROP TABLE IF EXISTS "#__patchtester_pulls"; DROP TABLE IF EXISTS "#__patchtester_tests"; +DROP TABLE IF EXISTS "#__patchtester_chain"; diff --git a/administrator/components/com_patchtester/install/sql/sqlsrv/install.sql b/administrator/components/com_patchtester/install/sql/sqlsrv/install.sql index ae894432..119b5067 100644 --- a/administrator/components/com_patchtester/install/sql/sqlsrv/install.sql +++ b/administrator/components/com_patchtester/install/sql/sqlsrv/install.sql @@ -25,3 +25,13 @@ CREATE TABLE [#__patchtester_tests]( [id] ASC ) WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF) ); + +CREATE TABLE [#__patchtester_chain] ( + [id] [bigint] IDENTITY(1,1) NOT NULL, + [insert_id] [bigint] NOT NULL, + [pull_id] [bigint] NOT NULL, + CONSTRAINT [PK_#__patchtester_chain] PRIMARY KEY CLUSTERED +( + [id] ASC +) WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF) +); diff --git a/administrator/components/com_patchtester/install/sql/sqlsrv/uninstall.sql b/administrator/components/com_patchtester/install/sql/sqlsrv/uninstall.sql index f396275a..53c9b4ec 100644 --- a/administrator/components/com_patchtester/install/sql/sqlsrv/uninstall.sql +++ b/administrator/components/com_patchtester/install/sql/sqlsrv/uninstall.sql @@ -1,2 +1,3 @@ DROP TABLE [#__patchtester_pulls]; DROP TABLE [#__patchtester_tests]; +DROP TABLE [#__patchtester_chain]; diff --git a/administrator/components/com_patchtester/install/sql/updates/mysql/4.0.0.sql b/administrator/components/com_patchtester/install/sql/updates/mysql/4.0.0.sql new file mode 100644 index 00000000..44d1d889 --- /dev/null +++ b/administrator/components/com_patchtester/install/sql/updates/mysql/4.0.0.sql @@ -0,0 +1,6 @@ +CREATE TABLE IF NOT EXISTS `#__patchtester_chain` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `insert_id` int(11) NOT NULL, + `pull_id` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci; \ No newline at end of file diff --git a/administrator/components/com_patchtester/install/sql/updates/postgresql/4.0.0.sql b/administrator/components/com_patchtester/install/sql/updates/postgresql/4.0.0.sql new file mode 100644 index 00000000..fb4458d1 --- /dev/null +++ b/administrator/components/com_patchtester/install/sql/updates/postgresql/4.0.0.sql @@ -0,0 +1,6 @@ +CREATE TABLE IF NOT EXISTS "#__patchtester_chain" ( + "id" serial NOT NULL, + "insert_id" bigint NOT NULL, + "pull_id" bigint NOT NULL, + PRIMARY KEY (`id`) +); diff --git a/administrator/components/com_patchtester/install/sql/updates/sqlsrv/4.0.0.sql b/administrator/components/com_patchtester/install/sql/updates/sqlsrv/4.0.0.sql new file mode 100644 index 00000000..3c6fac83 --- /dev/null +++ b/administrator/components/com_patchtester/install/sql/updates/sqlsrv/4.0.0.sql @@ -0,0 +1,9 @@ +CREATE TABLE [#__patchtester_chain] ( + [id] [bigint] IDENTITY(1,1) NOT NULL, + [insert_id] [bigint] NOT NULL, + [pull_id] [bigint] NOT NULL, + CONSTRAINT [PK_#__patchtester_chain] PRIMARY KEY CLUSTERED +( + [id] ASC +) WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF) +); diff --git a/administrator/components/com_patchtester/language/de-DE/de-DE.com_patchtester.ini b/administrator/components/com_patchtester/language/de-DE/de-DE.com_patchtester.ini index 7386fb77..0d609e3d 100644 --- a/administrator/components/com_patchtester/language/de-DE/de-DE.com_patchtester.ini +++ b/administrator/components/com_patchtester/language/de-DE/de-DE.com_patchtester.ini @@ -28,6 +28,8 @@ COM_PATCHTESTER_ERROR_TRUNCATING_PULLS_TABLE="Fehler beim Leeren der Pulls-Tabel COM_PATCHTESTER_ERROR_TRUNCATING_TESTS_TABLE="Fehler beim Leeren der Tests-Tabelle %s" COM_PATCHTESTER_ERROR_UNSUPPORTED_ENCODING="Die Patch-Dateien sind in mit einem nicht unterstützten Format codiert." COM_PATCHTESTER_ERROR_VIEW_NOT_FOUND="Ansicht nicht gefunden [Name, Format]: %1$s, %2$s" +COM_PATCHTESTER_FAILED_APPLYING_PATCH="Der Patch konnte nicht angewendet werden aufgrund eines Problems mit %1$s. %2$s" +COM_PATCHTESTER_FAILED_REVERT_PATCH="Der Patch konnte nicht zurückgesetzt werden aufgrund eines Problems mit %1$s. %2$s" COM_PATCHTESTER_FETCH_AN_ERROR_HAS_OCCURRED="Fehler beim Abrufen der Daten von GitHub." COM_PATCHTESTER_FETCH_COMPLETE_CLOSE_WINDOW="Alle Daten wurden abgerufen. Schließen Sie bitte dieses Popup um die Seite neu zu laden." COM_PATCHTESTER_FETCH_INITIALIZING="Vorbereitungen für das Abrufen der Daten von GitHub" @@ -57,10 +59,18 @@ COM_PATCHTESTER_FIELD_REPOSITORY_OPTION_PATCHTESTER="Joomla! Patch-Tester Kompon COM_PATCHTESTER_FIELD_REPOSITORY_OPTION_INSTALL_FROM_WEB="Joomla! Webkataloginstallations-Plugin" COM_PATCHTESTER_FIELD_REPOSITORY_OPTION_WEBLINKS="Joomla! Weblinks-Paket" COM_PATCHTESTER_FIELD_REPOSITORY_CUSTOM="Benutzerdefiniert" +COM_PATCHTESTER_FIELD_CI_SERVER_NAME="CI Server Adresse" +COM_PATCHTESTER_FIELD_CI_SERVER_NAME_DESC="Server Adresse für das Herunterladen kompilierter Patches." +COM_PATCHTESTER_FIELD_CI_SERVER_SWITCH="Switch CI Integration" +COM_PATCHTESTER_FIELD_CI_SERVER_SWITCH_DESC="Schaltet die CI Integration an oder aus." +COM_PATCHTESTER_FIELD_CI_SERVER_SWITCH_OPTION_ON="An" +COM_PATCHTESTER_FIELD_CI_SERVER_SWITCH_OPTION_OFF="Aus" COM_PATCHTESTER_FIELDSET_REPOSITORIES_DESC="Konfigurationswerte für GitHub Repository" COM_PATCHTESTER_FIELDSET_REPOSITORIES_LABEL="GitHub Repository" COM_PATCHTESTER_FIELDSET_AUTHENTICATION_DESC="Konfigurationswerte für GitHub Authentifizierung" COM_PATCHTESTER_FIELDSET_AUTHENTICATION_LABEL="GitHub Authentifizierung" +COM_PATCHTESTER_FIELDSET_CI_SETTINGS="CI Server Einstellungen" +COM_PATCHTESTER_FIELDSET_CI_SETTINGS_DESC="Konfigurationswerte für CI Server Patching" COM_PATCHTESTER_FILE_DELETED_DOES_NOT_EXIST_S="Die zu löschende Datei existiert nicht: %s" COM_PATCHTESTER_FILE_MODIFIED_DOES_NOT_EXIST_S="Die zu ändernde Datei existiert nicht: %s" COM_PATCHTESTER_FILTER_APPLIED_PATCHES="Angewendete Patches filtern" @@ -75,6 +85,7 @@ COM_PATCHTESTER_NO_CREDENTIALS="In den Optionen wurden noch keine Benutzerdaten COM_PATCHTESTER_NO_FILES_TO_PATCH="Es sind keine Dateien aus diesem Pull Request zu patchen. Dies kann bedeuten, dass die Dateien des Pull Requests in Ihrer Installation nicht vorhanden sind." COM_PATCHTESTER_NO_ITEMS="Es wurden noch keine Daten von Github abgerufen. Klicken Sie auf 'Daten abrufen' um die aktuellen Daten von Github zu holen." COM_PATCHTESTER_NOT_APPLIED="Nicht angewendet" +COM_PATCHTESTER_NOT_IN_ORDER_OF_PATCHCHAIN="Der Patch kann nicht zurückgesetzt werden, es muss zunächst erstmal der Patch mit der Pull ID %s zurückgesetzt werden." COM_PATCHTESTER_NOT_RTC="Nicht RTC" COM_PATCHTESTER_PULL_ID="Pull-ID" COM_PATCHTESTER_PULL_ID_ASC="Pull-ID aufsteigend" @@ -91,9 +102,11 @@ COM_PATCHTESTER_RESET_OK="Die Daten wurden erfolgreich zurück gesetzt." COM_PATCHTESTER_REVERT_OK="Der Patch wurde erfolgreich entfernt" COM_PATCHTESTER_REVERT_PATCH="Patch entfernen" COM_PATCHTESTER_RTC="RTC" +COM_PATCHTESTER_SERVER_RESPONDED_NOT_200="Es konnte entweder keine Verbindung zum Server aufgebaut werden oder der angegebene Pull Request existiert nicht auf dem Server." COM_PATCHTESTER_TEST_THIS_PATCH="Diesen Patch testen" COM_PATCHTESTER_TOOLBAR_FETCH_DATA="Daten abrufen" COM_PATCHTESTER_TOOLBAR_RESET="Zurücksetzen" COM_PATCHTESTER_VIEW_ON_GITHUB="Auf GitHub ansehen" COM_PATCHTESTER_VIEW_ON_JOOMLA_ISSUE_TRACKER="Im Joomla! Issue Tracker ansehen" - +COM_PATCHTESTER_ZIP_DOES_NOT_EXIST="Der Patch konnte nicht angewendet werden, weil er nicht vom Server heruntergeladen werden konnte." +COM_PATCHTESTER_ZIP_EXTRACT_FAILED="Der Patch konnte nicht angewendet werden, weil nicht entpackt werden konnte." 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 3bd44803..7f330a61 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 @@ -27,6 +27,8 @@ COM_PATCHTESTER_ERROR_TRUNCATING_PULLS_TABLE="Error truncating the pulls table: COM_PATCHTESTER_ERROR_TRUNCATING_TESTS_TABLE="Error truncating the tests table: %s" COM_PATCHTESTER_ERROR_UNSUPPORTED_ENCODING="The patch's files are encoded in an unsupported format." COM_PATCHTESTER_ERROR_VIEW_NOT_FOUND="View not found [name, format]: %1$s, %2$s" +COM_PATCHTESTER_FAILED_APPLYING_PATCH="Patch could not be applied due to exception with %1$s. %2$s" +COM_PATCHTESTER_FAILED_REVERT_PATCH="Patch could not be reverted due to exception with %1$s. %2$s" COM_PATCHTESTER_FETCH_AN_ERROR_HAS_OCCURRED="An error has occurred while fetching the data from GitHub." COM_PATCHTESTER_FETCH_COMPLETE_CLOSE_WINDOW="All data has been retrieved. Please close this modal window to refresh the page." COM_PATCHTESTER_FETCH_INITIALIZING="Preparing to fetch GitHub data" @@ -56,10 +58,18 @@ COM_PATCHTESTER_FIELD_REPOSITORY_OPTION_PATCHTESTER="Joomla! Patch Tester Compon 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_FIELD_CI_SERVER_NAME="CI Server Address" +COM_PATCHTESTER_FIELD_CI_SERVER_NAME_DESC="Server address for obtaining compiled patches." +COM_PATCHTESTER_FIELD_CI_SERVER_SWITCH="Switch CI Integration" +COM_PATCHTESTER_FIELD_CI_SERVER_SWITCH_DESC="Turn CI integration on or off." +COM_PATCHTESTER_FIELD_CI_SERVER_SWITCH_OPTION_ON="On" +COM_PATCHTESTER_FIELD_CI_SERVER_SWITCH_OPTION_OFF="Off" COM_PATCHTESTER_FIELDSET_REPOSITORIES_DESC="Configuration Values for GitHub Repository" COM_PATCHTESTER_FIELDSET_REPOSITORIES_LABEL="GitHub Repository" COM_PATCHTESTER_FIELDSET_AUTHENTICATION_DESC="Configuration Values for GitHub Authentication" COM_PATCHTESTER_FIELDSET_AUTHENTICATION_LABEL="GitHub Authentication" +COM_PATCHTESTER_FIELDSET_CI_SETTINGS="CI Server Settings" +COM_PATCHTESTER_FIELDSET_CI_SETTINGS_DESC="Configuration Values for CI Server Patching" COM_PATCHTESTER_FILE_DELETED_DOES_NOT_EXIST_S="The file marked for deletion does not exist: %s" COM_PATCHTESTER_FILE_MODIFIED_DOES_NOT_EXIST_S="The file marked for modification does not exist: %s" COM_PATCHTESTER_FILTER_APPLIED_PATCHES="Filter Applied Patches" @@ -74,6 +84,7 @@ COM_PATCHTESTER_NO_CREDENTIALS="You have not entered your user credentials in th COM_PATCHTESTER_NO_FILES_TO_PATCH="There are no files to patch from this pull request. This may mean that the files in the pull request are not present in your installation." COM_PATCHTESTER_NO_ITEMS="No data has been retrieved from GitHub, please click the 'Fetch Data' button in the toolbar to retrieve the open pull requests." COM_PATCHTESTER_NOT_APPLIED="Not Applied" +COM_PATCHTESTER_NOT_IN_ORDER_OF_PATCHCHAIN="You can't revert this patch, you need to revert the patch with the pull id %s first." COM_PATCHTESTER_NOT_RTC="Not RTC" COM_PATCHTESTER_PULL_ID="Pull ID" COM_PATCHTESTER_PULL_ID_ASC="Pull ID ascending" @@ -90,8 +101,11 @@ COM_PATCHTESTER_RESET_OK="The reset process has completed successfully." COM_PATCHTESTER_REVERT_OK="Patch successfully reverted" COM_PATCHTESTER_REVERT_PATCH="Revert Patch" COM_PATCHTESTER_RTC="RTC" +COM_PATCHTESTER_SERVER_RESPONDED_NOT_200="The patch could not be applied either due to missing connection to the server or missing patch on the server." COM_PATCHTESTER_TEST_THIS_PATCH="Test This Patch" COM_PATCHTESTER_TOOLBAR_FETCH_DATA="Fetch Data" COM_PATCHTESTER_TOOLBAR_RESET="Reset" COM_PATCHTESTER_VIEW_ON_GITHUB="View on GitHub" COM_PATCHTESTER_VIEW_ON_JOOMLA_ISSUE_TRACKER="View on Joomla! Issue Tracker" +COM_PATCHTESTER_ZIP_DOES_NOT_EXIST="The patch could not be applied, because it couldn't be retrieved from server." +COM_PATCHTESTER_ZIP_EXTRACT_FAILED="The patch could not be applied, because it couldn't be extracted." diff --git a/administrator/components/com_patchtester/language/en-US/en-US.com_patchtester.ini b/administrator/components/com_patchtester/language/en-US/en-US.com_patchtester.ini index 3ab9a786..d1724c60 100644 --- a/administrator/components/com_patchtester/language/en-US/en-US.com_patchtester.ini +++ b/administrator/components/com_patchtester/language/en-US/en-US.com_patchtester.ini @@ -28,6 +28,8 @@ COM_PATCHTESTER_ERROR_TRUNCATING_PULLS_TABLE="Error truncating the pulls table: COM_PATCHTESTER_ERROR_TRUNCATING_TESTS_TABLE="Error truncating the tests table: %s" COM_PATCHTESTER_ERROR_UNSUPPORTED_ENCODING="The patch's files are encoded in an unsupported format." COM_PATCHTESTER_ERROR_VIEW_NOT_FOUND="View not found [name, format]: %1$s, %2$s" +COM_PATCHTESTER_FAILED_APPLYING_PATCH="Patch could not be applied due to exception with %1$s. %2$s" +COM_PATCHTESTER_FAILED_REVERT_PATCH="Patch could not be reverted due to exception with %1$s. %2$s" COM_PATCHTESTER_FETCH_AN_ERROR_HAS_OCCURRED="An error has occurred while fetching the data from GitHub." COM_PATCHTESTER_FETCH_COMPLETE_CLOSE_WINDOW="All data has been retrieved. Please close this modal window to refresh the page." COM_PATCHTESTER_FETCH_INITIALIZING="Preparing to fetch GitHub data" @@ -57,10 +59,18 @@ COM_PATCHTESTER_FIELD_REPOSITORY_OPTION_PATCHTESTER="Joomla! Patch Tester Compon 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_FIELD_CI_SERVER_NAME="CI Server Address" +COM_PATCHTESTER_FIELD_CI_SERVER_NAME_DESC="Server address for obtaining compiled patches." +COM_PATCHTESTER_FIELD_CI_SERVER_SWITCH="Switch CI Integration" +COM_PATCHTESTER_FIELD_CI_SERVER_SWITCH_DESC="Turn CI integration on or off." +COM_PATCHTESTER_FIELD_CI_SERVER_SWITCH_OPTION_ON="On" +COM_PATCHTESTER_FIELD_CI_SERVER_SWITCH_OPTION_OFF="Off" COM_PATCHTESTER_FIELDSET_REPOSITORIES_DESC="Configuration Values for GitHub Repository" COM_PATCHTESTER_FIELDSET_REPOSITORIES_LABEL="GitHub Repository" COM_PATCHTESTER_FIELDSET_AUTHENTICATION_DESC="Configuration Values for GitHub Authentication" COM_PATCHTESTER_FIELDSET_AUTHENTICATION_LABEL="GitHub Authentication" +COM_PATCHTESTER_FIELDSET_CI_SETTINGS="CI Server Settings" +COM_PATCHTESTER_FIELDSET_CI_SETTINGS_DESC="Configuration Values for CI Server Patching" COM_PATCHTESTER_FILE_DELETED_DOES_NOT_EXIST_S="The file marked for deletion does not exist: %s" COM_PATCHTESTER_FILE_MODIFIED_DOES_NOT_EXIST_S="The file marked for modification does not exist: %s" COM_PATCHTESTER_FILTER_APPLIED_PATCHES="Filter Applied Patches" @@ -75,6 +85,7 @@ COM_PATCHTESTER_NO_CREDENTIALS="You have not entered your user credentials in th COM_PATCHTESTER_NO_FILES_TO_PATCH="There are no files to patch from this pull request. This may mean that the files in the pull request are not present in your installation." COM_PATCHTESTER_NO_ITEMS="No data has been retrieved from GitHub, please click the 'Fetch Data' button in the toolbar to retrieve the open pull requests." COM_PATCHTESTER_NOT_APPLIED="Not Applied" +COM_PATCHTESTER_NOT_IN_ORDER_OF_PATCHCHAIN="You can't revert this patch, you need to revert the patch with the pull id %s first." COM_PATCHTESTER_NOT_RTC="Not RTC" COM_PATCHTESTER_PULL_ID="Pull ID" COM_PATCHTESTER_PULL_ID_ASC="Pull ID ascending" @@ -91,9 +102,11 @@ COM_PATCHTESTER_RESET_OK="The reset process has completed successfully." COM_PATCHTESTER_REVERT_OK="Patch successfully reverted" COM_PATCHTESTER_REVERT_PATCH="Revert Patch" COM_PATCHTESTER_RTC="RTC" +COM_PATCHTESTER_SERVER_RESPONDED_NOT_200="The patch could not be applied either due to missing connection to the server or missing patch on the server." COM_PATCHTESTER_TEST_THIS_PATCH="Test This Patch" COM_PATCHTESTER_TOOLBAR_FETCH_DATA="Fetch Data" COM_PATCHTESTER_TOOLBAR_RESET="Reset" COM_PATCHTESTER_VIEW_ON_GITHUB="View on GitHub" COM_PATCHTESTER_VIEW_ON_JOOMLA_ISSUE_TRACKER="View on Joomla! Issue Tracker" - +COM_PATCHTESTER_ZIP_DOES_NOT_EXIST="The patch could not be applied, because it couldn't be retrieved from server." +COM_PATCHTESTER_ZIP_EXTRACT_FAILED="The patch could not be applied, because it couldn't be extracted." diff --git a/administrator/templates/atum/html/com_patchtester/pulls/default_items.php b/administrator/templates/atum/html/com_patchtester/pulls/default_items.php index 3961deec..d253cd38 100644 --- a/administrator/templates/atum/html/com_patchtester/pulls/default_items.php +++ b/administrator/templates/atum/html/com_patchtester/pulls/default_items.php @@ -17,56 +17,60 @@ $status = ' class="table-active"'; endif; ?> -> - - pull_id; ?> - - - escape($item->title); ?> - -
-
- - - + > + + pull_id; ?> + + + escape($item->title); ?> + -
- - - -
- applied) : ?> +
- sha, 0, 10)); ?> + + +
+
+ + + +
+ applied) : ?> +
+ sha, 0, 10)); ?> +
+ +
+ + + escape($item->branch); ?> + + + is_rtc) : ?> + + + + + + + applied) : ?> + + + + + + + applied) : ?> + + + -
- - - escape($item->branch); ?> - - - is_rtc) : ?> - - - - - - - applied) : ?> - - - - - - - applied) : ?> - - - - - - + +