* Fix bug#50694,50689

This commit is contained in:
zenggang
2022-03-15 02:56:31 +00:00
parent 99924a75a5
commit 2431e1ccc2
3 changed files with 35 additions and 3 deletions

View File

@@ -166,7 +166,31 @@ class gitModel extends model
' task:' . join(' ', $objects['tasks']) .
' bug:' . join(',', $objects['bugs']));
$this->repo->saveAction2PMS($objects, $log, $this->repoRoot, $repo->encoding, 'git');
if($repo->SCM == 'Gitlab')
{
if(!isset($gitlabAccountPairs))
{
$gitlabAccountPairs = array();
$gitlabUserList = $this->loadModel('gitlab')->apiGetUsers($repo->gitlab);
$acountIDPairs = $this->gitlab->getUserIdAccountPairs($repo->gitlab);
foreach($acountIDPairs as $openID => $account)
{
foreach($gitlabUserList as $gitlabUser)
{
if($gitlabUser->id == $openID)
{
$gitlabAccountPairs[$gitlabUser->realname] = $account;
break;
}
}
}
}
$this->repo->saveAction2PMS($objects, $log, $this->repoRoot, $repo->encoding, 'git', $gitlabAccountPairs);
}
else
{
$this->repo->saveAction2PMS($objects, $log, $this->repoRoot, $repo->encoding, 'git');
}
}
else
{