Skip to content

Commit 9f90a4a

Browse files
committed
Removed params validation
1 parent 1da518f commit 9f90a4a

File tree

2 files changed

+0
-28
lines changed

2 files changed

+0
-28
lines changed

lib/Github/Api/Organization/Actions/Variables.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Github\Api\Organization\Actions;
44

55
use Github\Api\AbstractApi;
6-
use Github\Exception\MissingArgumentException;
76

87
/**
98
* @link https://docs.github.com/en/rest/reference/actions#variables
@@ -41,24 +40,10 @@ public function show(string $organization, string $variableName)
4140
* @param string $organization
4241
* @param array $parameters
4342
*
44-
* @throws MissingArgumentException
45-
*
4643
* @return array|string
4744
*/
4845
public function create(string $organization, array $parameters)
4946
{
50-
if (!isset($parameters['name'])) {
51-
throw new MissingArgumentException(['name']);
52-
}
53-
54-
if (!isset($parameters['value'])) {
55-
throw new MissingArgumentException(['value']);
56-
}
57-
58-
if (!isset($parameters['visibility'])) {
59-
throw new MissingArgumentException(['visibility']);
60-
}
61-
6247
return $this->post('/orgs/'.rawurlencode($organization).'/actions/variables', $parameters);
6348
}
6449

@@ -113,10 +98,6 @@ public function selectedRepositories(string $organization, string $variableName)
11398
*/
11499
public function setSelectedRepositories(string $organization, string $variableName, array $parameters = [])
115100
{
116-
if (!isset($parameters['selected_repository_ids'])) {
117-
throw new MissingArgumentException(['selected_repository_ids']);
118-
}
119-
120101
return $this->put('/orgs/'.rawurlencode($organization).'/actions/variables/'.rawurlencode($variableName).'/repositories', $parameters);
121102
}
122103

lib/Github/Api/Repository/Actions/Variables.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Github\Api\Repository\Actions;
44

55
use Github\Api\AbstractApi;
6-
use Github\Exception\MissingArgumentException;
76

87
/**
98
* @link https://docs.github.com/en/rest/actions/variables?apiVersion=2022-11-28#about-variables-in-github-actions
@@ -48,14 +47,6 @@ public function show(string $username, string $repository, string $variableName)
4847
*/
4948
public function create(string $username, string $repository, array $parameters = [])
5049
{
51-
if (!isset($parameters['name'])) {
52-
throw new MissingArgumentException(['name']);
53-
}
54-
55-
if (!isset($parameters['value'])) {
56-
throw new MissingArgumentException(['value']);
57-
}
58-
5950
return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/actions/variables', $parameters);
6051
}
6152

0 commit comments

Comments
 (0)