From 433ea4ef5ad23c18d138ec0d77cac5dd92c642d3 Mon Sep 17 00:00:00 2001 From: Yurun Date: Thu, 6 May 2021 14:04:23 +0800 Subject: [PATCH] Fix publicKey --- lib/Github/Api/Organization/Actions/Secrets.php | 2 +- lib/Github/Api/Repository/Actions/Secrets.php | 2 +- test/Github/Tests/Api/Organization/Actions/SecretsTest.php | 2 +- test/Github/Tests/Api/Repository/Actions/SecretsTest.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Github/Api/Organization/Actions/Secrets.php b/lib/Github/Api/Organization/Actions/Secrets.php index 7a08212907f..b6140faf35e 100644 --- a/lib/Github/Api/Organization/Actions/Secrets.php +++ b/lib/Github/Api/Organization/Actions/Secrets.php @@ -139,6 +139,6 @@ public function removeSecret(string $organization, string $repositoryId, string */ public function publicKey(string $organization) { - return $this->get('/orgs/'.rawurlencode($organization).'/actions/secrets/secret-key'); + return $this->get('/orgs/'.rawurlencode($organization).'/actions/secrets/public-key'); } } diff --git a/lib/Github/Api/Repository/Actions/Secrets.php b/lib/Github/Api/Repository/Actions/Secrets.php index 4c38de203dc..6ba0e4ec9a1 100644 --- a/lib/Github/Api/Repository/Actions/Secrets.php +++ b/lib/Github/Api/Repository/Actions/Secrets.php @@ -90,6 +90,6 @@ public function remove(string $username, string $repository, string $secretName) */ public function publicKey(string $username, string $repository) { - return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/actions/secrets/secret-key'); + return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/actions/secrets/public-key'); } } diff --git a/test/Github/Tests/Api/Organization/Actions/SecretsTest.php b/test/Github/Tests/Api/Organization/Actions/SecretsTest.php index cf10c066c99..324b706975d 100644 --- a/test/Github/Tests/Api/Organization/Actions/SecretsTest.php +++ b/test/Github/Tests/Api/Organization/Actions/SecretsTest.php @@ -206,7 +206,7 @@ public function shouldGetPublicKey() $api ->expects($this->once()) ->method('get') - ->with('/orgs/KnpLabs/actions/secrets/secret-key') + ->with('/orgs/KnpLabs/actions/secrets/public-key') ->will($this->returnValue($expectedArray)); $this->assertEquals($expectedArray, $api->publicKey('KnpLabs')); diff --git a/test/Github/Tests/Api/Repository/Actions/SecretsTest.php b/test/Github/Tests/Api/Repository/Actions/SecretsTest.php index 670e623b688..5a5e20a4616 100644 --- a/test/Github/Tests/Api/Repository/Actions/SecretsTest.php +++ b/test/Github/Tests/Api/Repository/Actions/SecretsTest.php @@ -123,7 +123,7 @@ public function shouldGetPublicKey() $api ->expects($this->once()) ->method('get') - ->with('/repos/KnpLabs/php-github-api/actions/secrets/secret-key') + ->with('/repos/KnpLabs/php-github-api/actions/secrets/public-key') ->will($this->returnValue($expectedArray)); $this->assertEquals($expectedArray, $api->publicKey('KnpLabs', 'php-github-api'));