31
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-06-04 14:40:47 +00:00

Attempt at fixing formatting

This commit is contained in:
Weeblr 2021-03-04 09:47:01 +01:00 committed by GitHub
parent 485f139e8e
commit e72da7140e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -370,33 +370,33 @@ class PullsModel extends AbstractModel
foreach ($pulls as $pull)
{
// Check if this PR is RTC and has a `PR-` branch label
$isRTC = false;
$branch = '';
// Check if this PR is RTC and has a `PR-` branch label
$isRTC = false;
$branch = '';
foreach ($pull->labels as $label)
foreach ($pull->labels as $label)
{
if ($label->name === 'RTC')
{
if ($label->name === 'RTC')
{
$isRTC = true;
}
elseif (substr($label->name, 0, 3) === 'PR-')
{
$branch = substr($label->name, 3);
}
$isRTC = true;
}
elseif (substr($label->name, 0, 3) === 'PR-')
{
$branch = substr($label->name, 3);
}
}
// Build the data object to store in the database
$pullData = array(
(int) $pull->number,
$this->getDb()->quote(HTMLHelper::_('string.truncate', $pull->title, 150)),
$this->getDb()->quote(HTMLHelper::_('string.truncate', $pull->body, 100)),
$this->getDb()->quote($pull->html_url),
(int) $isRTC,
$this->getDb()->quote($branch),
);
// Build the data object to store in the database
$pullData = array(
(int) $pull->number,
$this->getDb()->quote(HTMLHelper::_('string.truncate', $pull->title, 150)),
$this->getDb()->quote(HTMLHelper::_('string.truncate', $pull->body, 100)),
$this->getDb()->quote($pull->html_url),
(int) $isRTC,
$this->getDb()->quote($branch),
);
$data[] = implode(',', $pullData);
$data[] = implode(',', $pullData);
}
// If there are no pulls to insert then bail, assume we're finished