* change comment to commit.

This commit is contained in:
wangyidong
2020-03-06 18:27:21 +08:00
parent 14bb491ce5
commit a694c8493f
12 changed files with 61 additions and 60 deletions
+6 -6
View File
@@ -71,9 +71,9 @@ class gitModel extends model
$this->loadModel('compile');
/* Get commit triggerType jobs by repoIdList. */
$commitJobs = $this->loadModel('job')->getListByTriggerType('commit', array_keys($this->repos));
$commitGroup = array();
foreach($commitJobs as $job) $commitGroup[$job->repo][$job->id] = $job;
$commentJobs = $this->loadModel('job')->getListByTriggerType('commit', array_keys($this->repos));
$commentGroup = array();
foreach($commentJobs as $job) $commentGroup[$job->repo][$job->id] = $job;
/* Get tag triggerType jobs by repoIdList. */
$tagJobs = $this->job->getListByTriggerType('tag', array_keys($this->repos));
@@ -93,13 +93,13 @@ class gitModel extends model
$this->printLog("get this repo logs.");
$lastInDB = $this->repo->getLatestComment($repoID);
$lastInDB = $this->repo->getLatestCommit($repoID);
/* Ignore unsynced branch. */
if(empty($lastInDB)) continue;
$commits = $repo->commits;
$version = $lastInDB->commit;
$logs = $this->repo->getUnsyncLogs($repo);
$logs = $this->repo->getUnsyncCommits($repo);
$objects = array();
if(!empty($logs))
{
@@ -126,7 +126,7 @@ class gitModel extends model
}
/* Create compile by comment. */
$jobs = zget($commitGroup, $repoID, array());
$jobs = zget($commentGroup, $repoID, array());
foreach($jobs as $job)
{
foreach(explode(',', $job->comment) as $comment)