mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2024-12-22 10:58:58 +00:00
Fixed codestyle
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
This commit is contained in:
parent
ef98862329
commit
3f60741211
@ -573,56 +573,56 @@ class PullsModel extends AbstractModel
|
||||
|
||||
foreach ($pulls as $pull)
|
||||
{
|
||||
// Check if this PR is RTC and has a `PR-` branch label
|
||||
$isRTC = false;
|
||||
$isNPM = false;
|
||||
$branch = '';
|
||||
// Check if this PR is RTC and has a `PR-` branch label
|
||||
$isRTC = false;
|
||||
$isNPM = false;
|
||||
$branch = '';
|
||||
|
||||
foreach ($pull->labels as $label)
|
||||
foreach ($pull->labels as $label)
|
||||
{
|
||||
if (strtolower($label->name) === 'rtc')
|
||||
{
|
||||
if (strtolower($label->name) === 'rtc')
|
||||
{
|
||||
$isRTC = true;
|
||||
}
|
||||
elseif (strpos($label->name, 'PR-') === 0)
|
||||
{
|
||||
$branch = substr($label->name, 3);
|
||||
}
|
||||
elseif (in_array(
|
||||
strtolower($label->name),
|
||||
['npm resource changed', 'composer dependency changed'],
|
||||
true
|
||||
))
|
||||
{
|
||||
$isNPM = true;
|
||||
}
|
||||
|
||||
$labels[] = implode(
|
||||
',',
|
||||
[
|
||||
(int) $pull->number,
|
||||
$this->getDb()->quote($label->name),
|
||||
$this->getDb()->quote($label->color),
|
||||
]
|
||||
);
|
||||
$isRTC = true;
|
||||
}
|
||||
elseif (strpos($label->name, 'PR-') === 0)
|
||||
{
|
||||
$branch = substr($label->name, 3);
|
||||
}
|
||||
elseif (in_array(
|
||||
strtolower($label->name),
|
||||
['npm resource changed', 'composer dependency changed'],
|
||||
true
|
||||
))
|
||||
{
|
||||
$isNPM = true;
|
||||
}
|
||||
|
||||
// Build the data object to store in the database
|
||||
$pullData = [
|
||||
(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,
|
||||
(int) $isNPM,
|
||||
$this->getDb()->quote($branch),
|
||||
];
|
||||
$labels[] = implode(
|
||||
',',
|
||||
[
|
||||
(int) $pull->number,
|
||||
$this->getDb()->quote($label->name),
|
||||
$this->getDb()->quote($label->color),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
$data[] = implode(',', $pullData);
|
||||
// Build the data object to store in the database
|
||||
$pullData = [
|
||||
(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,
|
||||
(int) $isNPM,
|
||||
$this->getDb()->quote($branch),
|
||||
];
|
||||
|
||||
$data[] = implode(',', $pullData);
|
||||
}
|
||||
|
||||
// If there are no pulls to insert then bail, assume we're finished
|
||||
|
Loading…
Reference in New Issue
Block a user