+ Add story label func.
This commit is contained in:
@@ -7,17 +7,23 @@ $config->gitlab->edit->requiredFields = 'name,url,token';
|
||||
|
||||
$config->gitlab->taskLabel = new stdclass();
|
||||
$config->gitlab->taskLabel->name = "zentao task";
|
||||
$config->gitlab->taskLabel->description = "task label from zentao";
|
||||
$config->gitlab->taskLabel->description = "task label from zentao, do NOT remove this";
|
||||
$config->gitlab->taskLabel->color = "#0033CC";
|
||||
$config->gitlab->taskLabel->priority = "0";
|
||||
|
||||
$config->gitlab->bugLabel = new stdclass();
|
||||
$config->gitlab->bugLabel->name = "zentao bug";
|
||||
$config->gitlab->bugLabel->description = "bug label from zentao";
|
||||
$config->gitlab->bugLabel->description = "bug label from zentao, do NOT remove this";
|
||||
$config->gitlab->bugLabel->color = "#D10069";
|
||||
$config->gitlab->bugLabel->priority = "0";
|
||||
|
||||
$config->gitlab->zentaoApiWebhookUrl = "%s/api.php?m=gitlab&f=webhook&product=%s&gitlab=%s";
|
||||
$config->gitlab->storyLabel = new stdclass();
|
||||
$config->gitlab->storyLabel->name = "zentao story";
|
||||
$config->gitlab->storyLabel->description = "story label from zentao, do NOT remove this";
|
||||
$config->gitlab->storyLabel->color = "##69D100";
|
||||
$config->gitlab->storyLabel->priority = "0";
|
||||
|
||||
config->gitlab->zentaoApiWebhookUrl = "%s/api.php?m=gitlab&f=webhook&product=%s&gitlab=%s";
|
||||
$config->gitlab->zentaoApiWebhookToken = "<access token>";
|
||||
|
||||
|
||||
|
||||
@@ -466,6 +466,7 @@ class gitlabModel extends model
|
||||
{
|
||||
if(strpos($label->name, $this->config->gitlab->taskLabel->name) == 0) return true;
|
||||
if(strpos($label->name, $this->config->gitlab->bugLabel->name) == 0) return true;
|
||||
if(strpos($label->name, $this->config->gitlab->storyLabel->name) == 0) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -494,9 +495,16 @@ class gitlabModel extends model
|
||||
$bugLabel->description = $this->config->gitlab->bugLabel->description;
|
||||
$bugLabel->color = $this->config->gitlab->bugLabel->color;
|
||||
$bugLabel->priority = $this->config->gitlab->bugLabel->priority;
|
||||
|
||||
$storyLabel = new stdclass();
|
||||
$storyLabel->name = $this->config->gitlab->storyLabel->name;
|
||||
$storyLabel->description = $this->config->gitlab->storyLabel->description;
|
||||
$storyLabel->color = $this->config->gitlab->storyLabel->color;
|
||||
$storyLabel->priority = $this->config->gitlab->storyLabel->priority;
|
||||
|
||||
$this->apiCreateLabel($gitlabID, $projectID, $taskLabel);
|
||||
$this->apiCreateLabel($gitlabID, $projectID, $bugLabel);
|
||||
$this->apiCreateLabel($gitlabID, $projectID, $storyLabel);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user