This commit is contained in:
liyuchun
2021-12-01 10:22:52 +08:00
parent ce93ea9cf0
commit cce8477c1c
4 changed files with 3 additions and 2 deletions

View File

@@ -69,7 +69,7 @@ class job extends control
$errors = dao::getError();
if($this->post->engine == 'gitlab' and isset($errors['server']))
{
$errors['gitlabRepo'][] = sprintf($this->lang->error->notempty, $this->lang->job->repo);
if(!isset($errors['repo'])) $errors['repo'][] = sprintf($this->lang->error->notempty, $this->lang->job->repoServer);
unset($errors['server']);
unset($errors['pipeline']);
}

View File

@@ -44,6 +44,7 @@ $lang->job->editedBy = 'Edited By';
$lang->job->editedDate = 'Edited Date';
$lang->job->lastTag = 'Last Tag';
$lang->job->deleted = 'Deleted';
$lang->job->repoServer = 'Repo Server';
$lang->job->lblBasic = 'Basic Info';

View File

@@ -44,6 +44,7 @@ $lang->job->editedBy = '由谁编辑';
$lang->job->editedDate = '编辑日期';
$lang->job->lastTag = '最后标签';
$lang->job->deleted = '已删除';
$lang->job->repoServer = '版本库服务器';
$lang->job->lblBasic = '基本信息';

View File

@@ -198,7 +198,6 @@ class jobModel extends model
$this->dao->insert(TABLE_JOB)->data($job)
->batchCheck($this->config->job->create->requiredFields, 'notempty')
->batchCheckIF($job->triggerType === 'schedule', "atDay,atTime", 'notempty')
->batchCheckIF($job->triggerType === 'commit', "comment", 'notempty')
->batchCheckIF(($this->post->repoType == 'Subversion' and $job->triggerType == 'tag'), "svnDir", 'notempty')