mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2024-05-28 11:30:47 +00:00
merging
This commit is contained in:
commit
291073828d
|
@ -7,7 +7,8 @@ COM_PATCHTESTER_REPO_IS_GONE="The patch could not be applied because the reposit
|
|||
COM_PATCHTESTER_CONFLICT="The patch could not be applied because it conflicts with a previously applied patch"
|
||||
COM_PATCHTESTER_COMPONENT_LABEL="Patch Tester"
|
||||
COM_PATCHTESTER_COMPONENT_DESC="Patch Tester Configuration Values"
|
||||
COM_PATCHTESTER_FIELD_ORG_LABEL="Github Username"
|
||||
COM_PATCHTESTER_FIELD_ORG_DESC="Name of account on Github of which to monitor pull requests"
|
||||
COM_PATCHTESTER_FIELD_REPO_LABEL="Github Repository"
|
||||
COM_PATCHTESTER_FIELD_REPO_DESC="Name of repository on Github of which to monitor pull requests"
|
||||
COM_PATCHTESTER_FIELD_ORG_DESC="Github Username"
|
||||
COM_PATCHTESTER_FIELD_ORG_LABEL="Name of account on Github of which to monitor pull requests"
|
||||
COM_PATCHTESTER_FIELD_REPO_DESC="Github Repository"
|
||||
COM_PATCHTESTER_FIELD_REPO_LABEL="Name of repository on Github of which to monitor pull requests"
|
||||
COM_PATCHTESTER_JOOMLACODE_ISSUE="Joomlacode Issue"
|
||||
|
|
|
@ -55,8 +55,8 @@ class PatchtesterModelPulls extends JModelList
|
|||
$params = JComponentHelper::getParams('com_patchtester');
|
||||
|
||||
$this->setState('params', $params);
|
||||
$this->setState('github_user', $params->get('org'));
|
||||
$this->setState('github_repo', $params->get('repo'));
|
||||
$this->setState('github_user', $params->get('org', 'joomla'));
|
||||
$this->setState('github_repo', $params->get('repo', 'joomla-cms'));
|
||||
// List state information.
|
||||
parent::populateState('title', 'asc');
|
||||
}
|
||||
|
@ -100,6 +100,13 @@ class PatchtesterModelPulls extends JModelList
|
|||
$github = new JGithub();
|
||||
$pulls = $github->pulls->getAll($this->getState('github_user'), $this->getState('github_repo'));
|
||||
usort($pulls, array($this, 'sortItems'));
|
||||
|
||||
foreach ($pulls AS &$pull)
|
||||
{
|
||||
$matches = array();
|
||||
preg_match('#\[\#([0-9]+)\]#', $pull->title, $matches);
|
||||
$pull->joomlacode_issue = isset($matches[1]) ? $matches[1] : 0;
|
||||
}
|
||||
return $pulls;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
<files folder="site">
|
||||
<filename>patchtester.php</filename>
|
||||
</files>
|
||||
<languages folder="site">
|
||||
<language tag="en-GB">language/en-GB.com_patchtester.ini</language>
|
||||
</languages>
|
||||
<administration>
|
||||
<menu img="class:patchtester">com_patchtester</menu>
|
||||
<files folder="admin">
|
||||
|
@ -36,11 +33,18 @@
|
|||
<filename>config.xml</filename>
|
||||
<filename>controller.php</filename>
|
||||
<filename>patchtester.php</filename>
|
||||
<folder>controllers</folder> <folder>models</folder>
|
||||
<folder>controllers</folder>
|
||||
<folder>models</folder>
|
||||
<folder>sql</folder>
|
||||
<folder>tables</folder>
|
||||
<folder>views</folder>
|
||||
<folder>language</folder>
|
||||
</files>
|
||||
</administration>
|
||||
|
||||
<!-- Extension Update Specification -->
|
||||
<updateservers>
|
||||
<server type="extension">https://raw.github.com/ianmacl/patchtester/master/updates/patchtester.xml</server>
|
||||
</updateservers>
|
||||
|
||||
</extension>
|
||||
|
|
|
@ -1 +1 @@
|
|||
DROP TABLE IF NOT EXISTS `#__tests`
|
||||
DROP TABLE IF EXISTS `#__tests`
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.modal');
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
@ -29,6 +30,9 @@ JHtml::_('behavior.tooltip');
|
|||
<th class="title">
|
||||
<?php echo JText::_('JGLOBAL_TITLE'); ?>
|
||||
</th>
|
||||
<th class="title">
|
||||
<?php echo JText::_('COM_PATCHTESTER_JOOMLACODE_ISSUE'); ?>
|
||||
</th>
|
||||
<th width="20%">
|
||||
<?php echo JText::_('JSTATUS'); ?>
|
||||
</th>
|
||||
|
@ -58,6 +62,15 @@ JHtml::_('behavior.tooltip');
|
|||
<td>
|
||||
<a href="<?php echo $item->html_url; ?>" title="<?php echo htmlspecialchars($item->body); ?>"><?php echo $item->title; ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
if ($item->joomlacode_issue > 0) {
|
||||
echo '<a href="http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=';
|
||||
echo $item->joomlacode_issue . '" class="modal" rel="{handler: \'iframe\', size: {x: 900, y: 500}}">';
|
||||
echo '[#' . $item->joomlacode_issue . ']</a>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php
|
||||
if ($patch && $patch->applied) {
|
||||
|
|
18
patchtester/build.sh
Executable file
18
patchtester/build.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
rm -rf site
|
||||
rm -rf admin
|
||||
rm -rf ../patchtester.tar.bz2
|
||||
cp -r ../administrator/components/com_patchtester admin
|
||||
cp -r ../components/com_patchtester site
|
||||
rm -rf admin/backups/*.txt
|
||||
mv admin/patchtester.xml patchtester.xml
|
||||
tar jcf ../com_patchtester.tar.bz2 site admin patchtester.xml
|
||||
|
||||
rm -rf github
|
||||
mkdir github
|
||||
cp ../libraries/joomla/client/github.php github
|
||||
cp ../libraries/joomla/client/githubobject.php github
|
||||
cp -r ../libraries/joomla/client/github github
|
||||
cp github.xml github
|
||||
tar jcf ../file_github.tar.bz2 github/*
|
||||
|
||||
tar jcf ../pkg_patchtester.tar.bz2 pkg_patchtester.xml ../com_patchtester.tar.bz2 ../file_github.tar.bz2
|
26
patchtester/github.xml
Normal file
26
patchtester/github.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<extension type="file" version="1.7" method="upgrade">
|
||||
<name>Github Library</name>
|
||||
<author>Joomla!</author>
|
||||
<authorEmail>ianlenmac@gmail.com</authorEmail>
|
||||
<authorUrl>http://www.joomla.org</authorUrl>
|
||||
<copyright>(C) 2011 Open Source Matters. All Rights Reserved.</copyright>
|
||||
<license>GPL v2.0 or later</license>
|
||||
<version>11.3</version>
|
||||
<creationDate>October 2011</creationDate>
|
||||
<description>FILES_TEST1_XML_DESCRIPTION</description>
|
||||
|
||||
<!-- Fileset definition -->
|
||||
<fileset>
|
||||
<files target="libraries/joomla/client">
|
||||
<filename>github.php</filename>
|
||||
<filename>githubobject.php</filename>
|
||||
<folder>github</folder>
|
||||
</files>
|
||||
</fileset>
|
||||
|
||||
<!-- Extension Update Specification -->
|
||||
<updateservers>
|
||||
<server type="extension">https://raw.github.com/ianmacl/patchtester/master/updates/github.xml</server>
|
||||
</updateservers>
|
||||
</extension>
|
14
patchtester/pkg_patchtester.xml
Normal file
14
patchtester/pkg_patchtester.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<extension type="package" version="1.7">
|
||||
<name>Patch Tester</name>
|
||||
<packagename>patchtester</packagename>
|
||||
<version>1.0alpha</version>
|
||||
<url>http://github.com/ianmacl/patchtester</url>
|
||||
<packager>Ian MacLennan</packager>
|
||||
<packagerurl>http://github.com/ianmacl/patchtester</packagerurl>
|
||||
<description>Patch Tester complete with Github Library</description>
|
||||
<files>
|
||||
<file type="file" id="file_github" >file_github.tar.bz2</file>
|
||||
<file type="component" id="com_patchtester" >com_patchtester.tar.bz2</file>
|
||||
</files>
|
||||
</extension>
|
5
updates/github.xml
Normal file
5
updates/github.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" ?>
|
||||
<updates>
|
||||
<update>
|
||||
</update>
|
||||
</updates>
|
5
updates/patchtester.xml
Normal file
5
updates/patchtester.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" ?>
|
||||
<updates>
|
||||
<update>
|
||||
</update>
|
||||
</updates>
|
Loading…
Reference in New Issue
Block a user