* Modify repo commit info.
This commit is contained in:
@@ -280,6 +280,9 @@ class Gitea
|
||||
$blame['lines'] = 1;
|
||||
$blame['content'] = strpos($matches[6], ' ') === false ? $matches[6] : substr($matches[6], 1);
|
||||
|
||||
$log = $this->log('', $matches[1], '', 1);
|
||||
$blame['message'] = $log[0]->comment;
|
||||
|
||||
$revision = $matches[1];
|
||||
$revLine = $matches[5];
|
||||
$blames[$revLine] = $blame;
|
||||
|
||||
@@ -268,7 +268,8 @@ class gitlab
|
||||
$line = array();
|
||||
$line['revision'] = $blame->commit->id;
|
||||
$line['committer'] = $blame->commit->committer_name;
|
||||
$line['time'] = $blame->commit->committer_name;
|
||||
$line['message'] = $blame->commit->message;
|
||||
$line['time'] = date('Y-m-d H:i:s', strtotime($blame->commit->committed_date));
|
||||
$line['line'] = $lineNumber;
|
||||
$line['lines'] = count($blame->lines);
|
||||
$line['content'] = array_shift($blame->lines);
|
||||
|
||||
@@ -266,6 +266,9 @@ class GitRepo
|
||||
$blame['lines'] = 1;
|
||||
$blame['content'] = strpos($matches[6], ' ') === false ? $matches[6] : substr($matches[6], 1);
|
||||
|
||||
$log = $this->log('', $matches[1], '', 1);
|
||||
$blame['message'] = $log[0]->comment;
|
||||
|
||||
$revision = $matches[1];
|
||||
$revLine = $matches[5];
|
||||
$blames[$revLine] = $blame;
|
||||
|
||||
@@ -280,6 +280,9 @@ class Gogs
|
||||
$blame['lines'] = 1;
|
||||
$blame['content'] = strpos($matches[6], ' ') === false ? $matches[6] : substr($matches[6], 1);
|
||||
|
||||
$log = $this->log('', $matches[1], '', 1);
|
||||
$blame['message'] = $log[0]->comment;
|
||||
|
||||
$revision = $matches[1];
|
||||
$revLine = $matches[5];
|
||||
$blames[$revLine] = $blame;
|
||||
|
||||
@@ -306,10 +306,14 @@ class Subversion
|
||||
$blame = array();
|
||||
$blame['revision'] = (int)$line->commit['revision'];
|
||||
$blame['committer'] = (string)$line->commit->author;
|
||||
$blame['time'] = substr($line->commit->date, 0, 10);
|
||||
$blame['time'] = date('Y-m-d H:i:s', strtotime($line->commit->date));
|
||||
$blame['line'] = (int)$line['line-number'];
|
||||
$blame['lines'] = 1;
|
||||
$blame['content'] = $content[$blame['line'] - 1];
|
||||
|
||||
$log = $this->log('', $blame['revision'], 'HEAD', 1);
|
||||
$blame['message'] = $log[0]->comment;
|
||||
|
||||
$revision = $blame['revision'];
|
||||
$revLine = $blame['line'];
|
||||
$blames[$revLine] = $blame;
|
||||
|
||||
Reference in New Issue
Block a user