Skip to content

Commit 7569055

Browse files
committed
Fixes
1 parent 4a50d98 commit 7569055

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

lib/Github/Api/Organization.php

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

55
use Github\Api\Organization\Actions\Secrets;
6+
use Github\Api\Organization\Actions\Variables;
67
use Github\Api\Organization\Hooks;
78
use Github\Api\Organization\Members;
89
use Github\Api\Organization\OutsideCollaborators;
@@ -110,6 +111,14 @@ public function secrets(): Secrets
110111
return new Secrets($this->getClient());
111112
}
112113

114+
/**
115+
* @return Variables
116+
*/
117+
public function variables(): Variables
118+
{
119+
return new Variables($this->getClient());
120+
}
121+
113122
/**
114123
* @return OutsideCollaborators
115124
*/

lib/Github/Api/Repo.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Github\Api\Repository\Actions\Artifacts;
66
use Github\Api\Repository\Actions\Secrets;
7+
use Github\Api\Repository\Actions\Variables;
78
use Github\Api\Repository\Actions\SelfHostedRunners;
89
use Github\Api\Repository\Actions\WorkflowJobs;
910
use Github\Api\Repository\Actions\WorkflowRuns;
@@ -405,6 +406,14 @@ public function secrets(): Secrets
405406
return new Secrets($this->getClient());
406407
}
407408

409+
/**
410+
* @link https://docs.github.com/en/rest/reference/actions#secrets
411+
*/
412+
public function variables(): Variables
413+
{
414+
return new Variables($this->getClient());
415+
}
416+
408417
/**
409418
* Manage the content of a repository.
410419
*

test/Github/Tests/Api/OrganizationTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ public function shouldGetTeamsApiObject()
8888
$this->assertInstanceOf(\Github\Api\Organization\Teams::class, $api->teams());
8989
}
9090

91+
/**
92+
* @test
93+
*/
94+
public function shouldGetVariablesApiObject()
95+
{
96+
$api = $this->getApiMock();
97+
98+
$this->assertInstanceOf(\Github\Api\Organization\Actions\Variables::class, $api->variables());
99+
}
100+
91101
/**
92102
* @return string
93103
*/

0 commit comments

Comments
 (0)