Giter VIP home page Giter VIP logo

patchtester's Introduction

Patch Tester Build Status Crowdin

License

The patch tester component follow's Joomla's license, the GNU General Public License Version 2 or Later.

The patch tester component includes GitHub Octicons whose fonts are licensed under the SIL Open Font License Version 1.1.

Instructions

Easily apply changes from pull requests.

To install the latest released version:

  1. Click on the releases link just above the file listing
  2. Click on the button to download either the .tar.bz2, .tar.gz, or .zip packages
  3. Log into your site's administrator section, go to Extension Manager > Install, and install the extension

To use the latest code from this GitHub repo:

  1. Download files into Joomla install.
  2. Log into your site's administrator section, go to Extension Manager > Discover, click the "Discover" button, and install the extension.

Click Apply Patch to apply the proposed changes from the pull request. Click Revert Patch to revert an applied patch.

You can read more about this extension on the Joomla! Documentation Wiki.

Video tutorial: https://www.youtube.com/watch?v=s881RLaFO8U ( patch tester 3.0 beta 3 - 2017 )

GitHub Two Factor Authentication

To use an account that has two factor authentication enabled, you'll have to create a personal access token on GitHub and store that token in the "GitHub Account Password" option in the component's config.

Translations

Translations for the patch tester component are managed on Crowdin.

fr-FR - Patch Tester en français

Appliquer facilement des demandes de correctifs.

Pour installer la dernière version du composant PatchTester :

  1. Cliquez sur l'onglet releases,
  2. Cliquez sur le lien correspondant au type de package que vous souhaitez télécharger : .tar.bz2, .tar.gz, ou .zip,
  3. Connectez-vous à l'interface d'administration de votre site Joomla! et allez dans Extensions>Gérer (Installation) et installez le composant comme n'importe quel composant Joomla.

Pour utiliser le dernier code pour ce répertoire GitHub :

  1. Téléchargez les fichiers dans le dossier temporaire de votre site Joomla,
  2. Connectez-vous à l'interface d'administration de votre site Joomla! et allez dans Extensions > Gérer (Découvrir) cliquez sur "Découvrir" et installez le composant.

Une fois le composant installé, rendez-vous sur Composants>Joomla! Patch Tester et appliquez les correctifs proposés. Cliquez sur "Retirer le correctif" pour revenir à la version en cours.

Pour plus d'informations veuillez consulter : PatchTester pour les Testeurs.

Didacticiel vidéo (en anglais) : https://www.youtube.com/watch?v=4OWgusZgIfk

Authentification en deux étapes GitHub

Pour pouvoir utiliser un compte utilisant le système d'authentification en deux étapes, vous devez créer un jeton personnalisé d'accès à GitHub et renseigner ce jeton dans le champ "Jeton GitHub"des paramètres de configuration du composant.

patchtester's People

Contributors

alikon avatar andrepereiradasilva avatar bakual avatar brianteeman avatar conconnl avatar crowdin-bot avatar dgrammatiko avatar elkuku avatar hackwar avatar hans2103 avatar hardik-codes avatar heelc29 avatar javigomez avatar mbabker avatar mtmeyrick avatar n6rej avatar obsidev avatar particthistle avatar photodude avatar renovate-bot avatar richard67 avatar roland-d avatar sebenns avatar sharkykz avatar sovainfo avatar tecpromotion avatar twister65 avatar weeblr avatar wilsonge avatar zero-24 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

patchtester's Issues

Unwanted side effect?

I'm unsure if this a problem with com_patchtester, but maybe someone "in the know" would like to give a look at what's happening with Joomla PR #4661 (joomla/joomla-cms#4661), where applying it through com_patchtester apparently has side effects on unrelated code...

Break "Fetch from GitHub" into steps with AJAX requests

In refactoring how data is retrieved and stored from GitHub, the current operation of fetching everything from GitHub then storing it all in the database is rather time consuming, and in some environments, could potentially cause timeouts or memory exhausted errors. Even on my system with a jacked up timeout setting and memory allotment, fetching the 500+ open PRs and storing to the database took close to two minutes and currently has zero user feedback; I had no idea if it was still running without refreshing the database table to see rows being added. This should be refactored to break it down into steps somewhat like the Smart Search indexer.

Searching appears to be case sensitive

When I was searching for microdata, I couldn't find anything - Microdata returned some results (all of which were using upper case M).

I'm not sure if there is a good reason for case sensitive searching but it was a little frustrating.

Joomla 3.3

Fresh install of 3.3 - links to Joomlacode show an error in the modal:

Error

Call to undefined function renderAssociationList()

Javascript error data fetching when github password contains "@"

# Steps to reproduce the issue

1- Click "Options"
2- In field "GitHub Account Password", insert "@"
3- Go to "Joomla! Patch Tester" and fetch data

Expected result

Fetching data from github

Actual result

Javascript error when fetching

ReferenceError: Joomla is not defined in fetcher.js line 62
jQuery('#patchtester-progress-header').text(Joomla.JText._('COM_PATCHTESTER_FETC...

2015-05-09 14_37_22

patch removed then applied new patch does not work

Tried to apply a new patch after testing a previous one
Now get the issue that it conflicts due to files still on the system

What do you need to know to sort this out ?
This is causing an issue with patch testing.

Bug ?

Installing on Joomla 2.5.17 and get fatal error:

Fatal error: Class 'JModelList' not found in /home/gwsd2/public_html/administrator/components/com_patchtester/models/pulls.php on line 18

Appling patch #3292 using a J3.3.7-dev with a postgresql db fails

My testing environment:

  • Centos 6.5
  • php 5.4.16
  • PostgreSQL 9.3.5
  • Joomla 3.3.7-dev with com_patchtester 2.0.0 beta

When I try to apply path #3292 I get the following error:
Error
Database query failed (error # %s): %s SQL=INSERT INTO "zbjnd_patchtester_tests" ("pull_id","data","patched_by","applied","applied_version") VALUES (3292,'[{"action":"modified","index":"18d5a53..10bd3b9 100644","old":"modules/mod_articles_archive/helper.php","new":"modules/mod_articles_archive/helper.php","body":"\n\n

Applying the same patch using the same testing environment with mysql went find.

Issue Tracker Integration

Build an integration to the issue tracker to enable commenting and recording test results for a PR within the component. This will probably be an added button next to the "Revert Patch" button that opens a modal with the input form.

Unable to sort by applied patches

When I am using com_patchtester I am unable to sort the patches by the status column. This means that if I have applied a patch which is many pages in, I have to either know the ID of the patch or the name of the patch to find it - I can't quickly see if anyon patches are applied in my installation.

It would be ideal if you could sort the patches by the status column to quickly see if any patches are currently applied.

Ordering issues for some installs

During the Dutch PBF in Dordrecht a user told me about this error, but I don't have more information. Just sending it to you so you know about it. After install the had an error referring to
administrator/components/com_patchtester/PatchTester/View/Pulls/tmpl/default.php
line 17-20

Later he enabled OpenSSL and downgraded to the beta (he was using beta2) and it was gone.

That's all I know.

$listOrder     = $this->escape($this->state->get('list.ordering'));
$listDirn      = $this->escape($this->state->get('list.direction'));
$filterApplied = $this->escape($this->state->get('filter.applied'));
$sortFields    = $this->getSortFields();

Several issues with com_patchtester 2.0.0.beta3

@mbabker

Michael,
I'm experiencing at least a couple of blocking issues with com_patchtester 2.0.0.beta3 under Joomla! 3.4.2-dev (current staging):

  • On a pre-existing installation (I mean I previously had 2.0.0.beta2 installed, then uninstalled it and finally installed 2.0.0.beta3) when I click the "Fetch data" button a modal stating "Fetching GitHub Data" appear, but nothing actually happens (no data fetched and the modal never disappear). My GitHub credentials were correctly set beforehand.
  • On a clean fresh installation (of both Joomla! and com_patchtester) I'm getting the following two errors when going to "Joomla! Patch Tester":
Warning: Header may not contain more than a single header, new line detected in D:\UniServerZ\vhosts\dev\libraries\joomla\application\web.php on line 960

and

Error
An error has occurred.

    1146 Table 'dev.j342_patchtester_pulls' doesn't exist SQL=SELECT COUNT(*) FROM `J342_patchtester_pulls` AS `a` LEFT JOIN `J342_patchtester_tests` AS `t` ON t.pull_id = a.pull_id 

My system information:

PHP Built On    Windows NT SMZ 6.3 build 9200 (Windows 8.1 Business Edition) i586
Database Version    5.6.23
Database Collation  utf8_general_ci
PHP Version     5.4.39
Web Server  Apache
WebServer to PHP Interface  apache2handler
Joomla! Version     Joomla! 3.4.2-dev Development [ Ember ] 21-March-2015 20:30 GMT
Joomla! Platform Version    Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent  Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0 

Don't throw an exception when you can't connect to server

I've seen a couple of people report when they get an error because username/password is incorrect on github they struggle to edit their passwords again (they have to go access the config via global configuration which clearly isn't ideal!)

Can we not display an "in component" error rather than blocking all access to the component?

GitHub restrictions or bug

I'm testing the Patchtester on a local system with a Git client synchronized Cms clone. I first got a red + a blue message when I applied a patch. i.e.didn't work.

A day later I get no patches listed at all. My credentials are set in the options and should be ok.

Is there a personal restriction or is it a repository restriction? I found some restrictions mentioned in the GitHub Api doc referring to "you". Or is it a bug?

Error message:

Notice:
The GitHub API rate limit has been reached for this resource, could not
connect to GitHub for updated data. The rate limit will reset at
2013-12-10 15:27:28

Add a limit on the number of items retrieved

It would be good to have a limit on the number of items retrieved from Github. We could have a kind of filter to get the last x items or only get the PR ID that is set in the search box or only for a given time limit. Just some ideas from the top of my head.

Sort by status missing

Hi
I'm starting using the patchtester this week. Really a great work! But...
To see if there are still patches applied in my installation from my last test session/evening it would be helpful to be able to sort the 'status' column.

Sure, I could set the pagination set to 'all' and scroll down or use the browsers search (ctrl+f), but in my patchtester-instance the paginations 'list all' wont work somehow (J 3.4).

And again: concrats to this wonderful tool, it leads my to test patches on a regular basis from now.

Layout Path Not Found

When building a package from the current git files installation went fine, but invoking patchtester in the administration results in an errror:

0 Layout Path Not Found

I seems that the template file are not installed in the right directory.

-1 Destination folder not found, Joomla 3.2 beta 1

Can't install since about a day or so ago (can't locate the exact SHA of working commit if you'd like). I get that error when attempting to install the package. /components/com_patchtester is created, but is empty 💔

Problem applying a patch on postgres

Not sure if this more of a duplicate of issue #47, as the actual installation of the component worked, but when trying to apply patches it gives the following error;

Error
Database query failed (error # %s): %s SQL=INSERT INTO "dg20d_patchtester_tests" ("pull_id","data","patched_by","applied","applied_version") VALUES (4844,'[{"action":"modified","index":"5040f9d..7028758 100644","old":"administrator/components/com_config/view/application/html.php","new":"administrator/components/com_config/view/application/html.php","body":"model->getForm();\n\t\t\t$data = $this->model->getData();\n\t\t\t$user = JFactory::getUser();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tJFactory::getApplication()->enqueueMessage($e->getMessage(), ''error'');\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Bind data\n\t\tif ($form && $data)\n\t\t{\n\t\t\t$form->bind($data);\n\t\t}\n\t\t// Get the params for com_users.\n\t\t$usersParams = JComponentHelper::getParams(''com_users'');\n\n\t\t// Get the params for com_media.\n\t\t$mediaParams = JComponentHelper::getParams(''com_media'');\n\n\t\t// Load settings for the FTP layer.\n\t\t$ftp = JClientHelper::setCredentialsFromRequest(''ftp'');\n\n\t\t$this->form = &$form;\n\t\t$this->data = &$data;\n\t\t$this->ftp = &$ftp;\n\t\t$this->usersParams = &$usersParams;\n\t\t$this->mediaParams = &$mediaParams;\n\n\t\t$this->components = ConfigHelperConfig::getComponentsWithConfig();\n\t\tConfigHelperConfig::loadLanguageForComponents($this->components);\n\n\t\t$this->userIsSuperAdmin = $user->authorise(''core.admin'');\n\n\t\t$this->addToolbar();\n\t\tJFactory::getApplication()->input->set(''hidemainmenu'', true);\n\n\t\treturn parent::render();\n\t}\n\n\t/**\n\t * Add the page title and toolbar.\n\t *\n\t * @return void\n\t *\n\t * @SInCE\t3.2\n\t */\n\tprotected function addToolbar()\n\t{\n\t\tJToolbarHelper::title(JText::_(''COM_CONFIG_GLOBAL_CONFIGURATION''), ''equalizer config'');\n\t\tJToolbarHelper::apply(''config.save.application.apply'');\n\t\tJToolbarHelper::save(''config.save.application.save'');\n\t\tJToolbarHelper::divider();\n\t\tJToolbarHelper::cancel(''config.cancel.application'');\n\t\tJToolbarHelper::divider();\n\t\tJToolbarHelper::help(''JHELP_SITE_GLOBAL_CONFIGURATION'');\n\t}\n}\n"}]',67,1,'3.3.7-dev') RETURNING id

One more view

Can we add one more view with all the applied patches?

The reason I am asking for this is that if somebody applies a PR and later on the patch gets accepted the patch will not reveal itself in the list, and therefore is kinda hard to revert the patch from the environment.
As far as I checked there is a table in the db where the applied patches are stored, so it won’t be that hard to make one more view with a list of all this. (the data column also got the title, etc…)

Uninstalling Patch results in PHP Fatal Error

To reproduce:

  • From Patch Tester com, install patch from 4718,
  • Uninstall patch

Results in error:

Fatal error: Class 'JSubMenuHelper' not found in /var/www/html/pbf33/administrator/modules/mod_submenu/mod_submenu.php on line 12

Checking administrator/includes/toolbar.php shows class JSubMenuHelper exists and refreshing the page rectifies the problem.

Installing on postgres ;(

Trying to install on postgres gives a sql error

Database query failed (error # %s): %s SQL=SELECT COUNT(*) FROM "s376f_patchtester_pulls" AS "a" LEFT JOIN "s376f_patchtester_tests" AS "t" ON t.pull_id = a.pull_id WHERE ("a"."title" LIKE '%4815%') OR ("a"."pull_id" LIKE '%4815%')

Search with no results shows regular pagination

If I search the list of issues for something which is not found, I get nothing displayed, and the full pagination as if all items were being listed.

Expected behaviour would be:

  • Show a 'No issues found' message
  • Pagination is not displayed, as there are no issues to paginate

No check of the GitHub account

Steps to reproduce the issue

open the Options light box of Patch tester
set a wrong account in the options lightbox.
click on Save&close
click on the Fetch data bouton

Expected result

a warning message must explain that the account is not correct.

Actual result

the lightbox of "Fecth Data" open and display the followwing message :
"Preparing to fetch GitHub data
Making sure all is well to fetch data. Sit tight."

System information (as much as possible)

Patch tester : v2.0.0.beta2 October 2011

Additional comments

Binary Files

The patch tester (i'm assuming uses diff) which ignores binary files. We just wasted 3 hours debugging an issue with a pull request that had ttf and woff fonts which are binary and were not getting applied.

Either the patchtester needs a way to handle binary files OR at a minimum give a notice that filex was not copied

Error: Unable to find install package - Joomla! 3.4.1

Hello guys,

Trying install the patchtester on the latest version of joomla 3.4.1, but the below messages have been displayed.

Warning:
JInstaller: :Install: Can't find Joomla XML setup file.

Error:
Unable to find install package
extension manager install

Thanks.

Filtering and sorting on "Status"

Would it be possible to extend functionality and have a filter allowing to see only currently applied PRs and/or sort on "Status"? That would make testing quite easier...

Thanks!

Sergio

Not working with Github credentials

The error after putting in credentials on a local install using Mamp on a Mac with latest Joomla testing version of Joomla:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

Ignore files not in standard distro

Update patching process to skip files not including in the standard CMS distribution. Attempting to apply a PR which includes a change in the tests folder, for example, causes a failure.

FAQ : error msg on WAMPserver : Unable to find the socket transport 'ssl'

One member of my PBF session has got this error when installing com_patchtester 2.0.0 Beta.
He has a WampServer with PHP 5.3.13.
After some checks in his PHP configuration, we find that its Socket Transport has no "SSL".

Solution :

  • in the WampServer menu
  • activate the PHP module openssl
  • then go to the Joomla admin menu : System > Sytem information > PHP information
  • you will see that Socket Transport has now 'SSL' features :

socket_transport-phpconfig

New build: for PBF

Can we create a new official build, because not all testers knows how to create a new build

Rename configuration labels

We need to rename the configuration labels. Users put in their own username and password in the Github username and Github Repository fields. A rename to something like Github project username and Github project Repository.

Applying patch results in 400: Invalid request

To reproduce:

  • From patch tester, search for pull id 4718,
  • Apply Patch

Error 400: Invalid request will appear at the top of the page along with PHP error:

Fatal error: Class 'JToolBarHelper' not found in /path/to/joomla/administrator/components/com_patchtester/views/pulls/view.html.php on line 119

Checking the patched files administrator/includes/toolbar.php and administrator/includes/subtoolbar.php both contain the 400 text.

Searching for a Pull ID doesn't work

e.g. search for 1495 in the Pull Id box and press search. You get no results (possibly related to previous cache issue.) Note the results still stay blank if you press clear in the box. The only way to get a list of data is to click on purge cache

Fatal error with JHttpTransport when curl is disabled

How to reproduce the problem and/or test the patch:: You need to have curl extension disabled on php, and you will obtain this fatal error.

The issue can be reproduced by using 2.0 version of com_patch and by clicking on apply patch, then the issue happens.


Initial Comment:

Catchable fatal error: Argument 2 passed to JHttp::__construct() must implement interface JHttpTransport, boolean given, called in C:\wamp\www\joomla_master\libraries\joomla\http\factory.php on line 37 and defined in C:\wamp\www\joomla_master\libraries\joomla\http\http.php on line 42

Search filter no longer searches on pull ID

In the old tracker the search field would also search for the pull ID, now it only searches the Joomlacode issue ID. It would be better to search on both as we often look for the pull ID.

An example is searching for pull ID 3362, it only shows Joomlacode issue IDs with this combination in it.

Pagination seems to be broken

Pagination appears to be broken (although it's partially broken on the old non-alpha release as well where you can't navigate from page 4 to 5)

The Patch Tester Component also shows RTC issues

People who help out with testing patches need to test patches that have 0 or 1 tests,
but not the issues that are marked as RTC.

The Patch Tester Component also shows issues that have been marked RTC.

Is it possible to add an extra selection filter to only show items that are not marked as RTC?
Thanks!

Cannot use due to Two-Step Authentication

Due to company security restrictions I have Github two-step authentication activated
When I add my credentials (username & password) to com_patchtester I receive the following error:

An error has occurred.
401 Must specify two-factor authentication OTP code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.