Skip to content

Commit 7bbfbd2

Browse files
committed
added $protected $environment_scope to addVariable and updateVariable
1 parent 70aeb9f commit 7bbfbd2

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

lib/Gitlab/Api/Projects.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -564,26 +564,34 @@ public function variable($project_id, $key)
564564
* @param int $project_id
565565
* @param string $key
566566
* @param string $value
567+
* @param bool $protected
568+
* @param string $environment_scope
567569
* @return mixed
568570
*/
569-
public function addVariable($project_id, $key, $value)
571+
public function addVariable($project_id, $key, $value, $protected = false, $environment_scope ="*")
570572
{
571573
return $this->post($this->getProjectPath($project_id, 'variables'), array(
572574
'key' => $key,
573-
'value' => $value
575+
'value' => $value,
576+
'protected' => $protected,
577+
'environment_scope' => $environment_scope,
574578
));
575579
}
576580

577581
/**
578582
* @param int $project_id
579583
* @param string $key
580584
* @param string $value
585+
* @param bool $protected
586+
* @param string $environment_scope
581587
* @return mixed
582588
*/
583-
public function updateVariable($project_id, $key, $value)
589+
public function updateVariable($project_id, $key, $value, $protected = false, $environment_scope ="*")
584590
{
585591
return $this->put($this->getProjectPath($project_id, 'variables/'.$this->encodePath($key)), array(
586592
'value' => $value,
593+
'protected' => $protected,
594+
'environment_scope' => $environment_scope,
587595
));
588596
}
589597

0 commit comments

Comments
 (0)