Skip to content

Commit 91f2aa4

Browse files
committed
Merge branch '2.x'
* 2.x: Fix publicKey
2 parents 9ce0b08 + 3900484 commit 91f2aa4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,6 @@ public function removeSecret(string $organization, string $repositoryId, string
139139
*/
140140
public function publicKey(string $organization)
141141
{
142-
return $this->get('/orgs/'.rawurlencode($organization).'/actions/secrets/secret-key');
142+
return $this->get('/orgs/'.rawurlencode($organization).'/actions/secrets/public-key');
143143
}
144144
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,6 @@ public function remove(string $username, string $repository, string $secretName)
9090
*/
9191
public function publicKey(string $username, string $repository)
9292
{
93-
return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/actions/secrets/secret-key');
93+
return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/actions/secrets/public-key');
9494
}
9595
}

test/Github/Tests/Api/Organization/Actions/SecretsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public function shouldGetPublicKey()
206206
$api
207207
->expects($this->once())
208208
->method('get')
209-
->with('/orgs/KnpLabs/actions/secrets/secret-key')
209+
->with('/orgs/KnpLabs/actions/secrets/public-key')
210210
->will($this->returnValue($expectedArray));
211211

212212
$this->assertEquals($expectedArray, $api->publicKey('KnpLabs'));

test/Github/Tests/Api/Repository/Actions/SecretsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function shouldGetPublicKey()
123123
$api
124124
->expects($this->once())
125125
->method('get')
126-
->with('/repos/KnpLabs/php-github-api/actions/secrets/secret-key')
126+
->with('/repos/KnpLabs/php-github-api/actions/secrets/public-key')
127127
->will($this->returnValue($expectedArray));
128128

129129
$this->assertEquals($expectedArray, $api->publicKey('KnpLabs', 'php-github-api'));

0 commit comments

Comments
 (0)