mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2025-01-03 07:12:36 +00:00
Pull PR directly instead of Issues from Github
This commit is contained in:
parent
560abdec67
commit
49db0f2382
@ -508,7 +508,7 @@ class PullsModel extends AbstractModel
|
||||
// TODO - Option to configure the batch size
|
||||
$batchSize = 100;
|
||||
|
||||
$pullsResponse = Helper::initializeGithub()->getOpenIssues(
|
||||
$pullsResponse = Helper::initializeGithub()->getOpenPulls(
|
||||
$this->getState()->get('github_user'),
|
||||
$this->getState()->get('github_repo'),
|
||||
$page,
|
||||
@ -572,8 +572,6 @@ class PullsModel extends AbstractModel
|
||||
$labels = [];
|
||||
|
||||
foreach ($pulls as $pull)
|
||||
{
|
||||
if (isset($pull->pull_request))
|
||||
{
|
||||
// Check if this PR is RTC and has a `PR-` branch label
|
||||
$isRTC = false;
|
||||
@ -618,7 +616,7 @@ class PullsModel extends AbstractModel
|
||||
$this->getDb()->quote(
|
||||
HTMLHelper::_('string.truncate', $pull->body, 100)
|
||||
),
|
||||
$this->getDb()->quote($pull->pull_request->html_url),
|
||||
$this->getDb()->quote($pull->html_url),
|
||||
(int) $isRTC,
|
||||
(int) $isNPM,
|
||||
$this->getDb()->quote($branch),
|
||||
@ -626,7 +624,6 @@ class PullsModel extends AbstractModel
|
||||
|
||||
$data[] = implode(',', $pullData);
|
||||
}
|
||||
}
|
||||
|
||||
// If there are no pulls to insert then bail, assume we're finished
|
||||
if (count($data) === 0)
|
||||
|
Loading…
Reference in New Issue
Block a user