* [task#135720] add count of yearly add rows in user metric.
This commit is contained in:
@@ -50,3 +50,23 @@ class count_of_yearly_add_rows_in_user extends baseCalc
|
||||
{
|
||||
if(isset($this->result[$account->account])) return false;
|
||||
$this->result[$account->account] = array();
|
||||
|
||||
$repo = current($this->repos);
|
||||
$repo->account = $account->account;
|
||||
$repo->email = $account->email;
|
||||
$repo->client = '';
|
||||
$repo->account = '';
|
||||
$repo->encoding = 'utf-8';
|
||||
$repo->password = $repo->token;
|
||||
$repo->apiPath = $repo->serverUrl . '/api/v1';
|
||||
$repo->SCM = 'GitFox';
|
||||
$this->scm->setEngine($repo);
|
||||
|
||||
$result = $this->scm->engine->getCodeFrequencyByUser($account->email, 'month', $begin, $end);
|
||||
if(empty($result)) return false;
|
||||
foreach($result->stats as $stats)
|
||||
{
|
||||
$account->time = $stats->key;
|
||||
$account->additions = $stats->additions;
|
||||
$this->setResult($account);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user