|
3 | 3 | namespace Github\Api\Organization\Actions; |
4 | 4 |
|
5 | 5 | use Github\Api\AbstractApi; |
6 | | -use Github\Exception\MissingArgumentException; |
7 | 6 |
|
8 | 7 | /** |
9 | 8 | * @link https://docs.github.com/en/rest/reference/actions#variables |
@@ -41,24 +40,10 @@ public function show(string $organization, string $variableName) |
41 | 40 | * @param string $organization |
42 | 41 | * @param array $parameters |
43 | 42 | * |
44 | | - * @throws MissingArgumentException |
45 | | - * |
46 | 43 | * @return array|string |
47 | 44 | */ |
48 | 45 | public function create(string $organization, array $parameters) |
49 | 46 | { |
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 | | - |
62 | 47 | return $this->post('/orgs/'.rawurlencode($organization).'/actions/variables', $parameters); |
63 | 48 | } |
64 | 49 |
|
@@ -113,10 +98,6 @@ public function selectedRepositories(string $organization, string $variableName) |
113 | 98 | */ |
114 | 99 | public function setSelectedRepositories(string $organization, string $variableName, array $parameters = []) |
115 | 100 | { |
116 | | - if (!isset($parameters['selected_repository_ids'])) { |
117 | | - throw new MissingArgumentException(['selected_repository_ids']); |
118 | | - } |
119 | | - |
120 | 101 | return $this->put('/orgs/'.rawurlencode($organization).'/actions/variables/'.rawurlencode($variableName).'/repositories', $parameters); |
121 | 102 | } |
122 | 103 |
|
|
0 commit comments