diff --git a/src/Github/Api.php b/src/Github/Api.php index 9706c5e..1acc6a7 100644 --- a/src/Github/Api.php +++ b/src/Github/Api.php @@ -64,7 +64,7 @@ public function request(string $method, string $endpoint, array $options = []): return $this->rawRequest($method, $endpoint, $options)->toArray(); } - return $this->cache->get($method.$endpoint, function(CacheItemInterface $item) use ($method, $endpoint, $options) { + return $this->cache->get(sha1($method.$endpoint), function(CacheItemInterface $item) use ($method, $endpoint, $options) { $response = $this->rawRequest($method, $endpoint, $options); if (\preg_match('#max-age=(\d+)#', $response->getHeaders()['cache-control'][0] ?? '', $matches)) { diff --git a/tests/Command/GenerateCommandTest.php b/tests/Command/GenerateCommandTest.php index db8d1e6..a693818 100644 --- a/tests/Command/GenerateCommandTest.php +++ b/tests/Command/GenerateCommandTest.php @@ -50,7 +50,7 @@ public function changelog_with_no_previous_release(): void ->execute() ->assertSuccessful() ->assertOutputContains('Generating changelog for zenstruck/.github:main') - ->assertOutputContains('f9489f5 Update MAINTENANCE.md by @kbond') + ->assertOutputContains('e1025ad revert enabling php-cs-fixer parallel processing by @kbond') ->assertOutputContains('Done. View changeset on Github: https://github.com/zenstruck/.github/commits/main') ; } diff --git a/tests/Command/ReleaseCommandTest.php b/tests/Command/ReleaseCommandTest.php index 27e1c88..bb8d593 100644 --- a/tests/Command/ReleaseCommandTest.php +++ b/tests/Command/ReleaseCommandTest.php @@ -141,7 +141,7 @@ public function next_major_with_no_previous_release(): void ->assertSuccessful() ->assertOutputContains('Releasing as v1.0.0 (v1.0.0)') ->assertOutputContains('Generating changelog for zenstruck/.github:main') - ->assertOutputContains('f9489f5 Update MAINTENANCE.md by @kbond') + ->assertOutputContains('e1025ad revert enabling php-cs-fixer parallel processing by @kbond') ->assertOutputContains('[Full Change List](https://github.com/zenstruck/.github/commits/v1.0.0)') ; } @@ -158,7 +158,7 @@ public function next_major_interactive_with_no_previous_release(): void ->assertSuccessful() ->assertOutputContains('Releasing as v1.0.0 (v1.0.0)') ->assertOutputContains('Generating changelog for zenstruck/.github:main') - ->assertOutputContains('f9489f5 Update MAINTENANCE.md by @kbond') + ->assertOutputContains('e1025ad revert enabling php-cs-fixer parallel processing by @kbond') ->assertOutputContains('Not creating release.') ; } @@ -175,7 +175,7 @@ public function next_minor_with_no_previous_release(): void ->assertSuccessful() ->assertOutputContains('Releasing as v0.1.0 (v0.1.0)') ->assertOutputContains('Generating changelog for zenstruck/.github:main') - ->assertOutputContains('f9489f5 Update MAINTENANCE.md by @kbond') + ->assertOutputContains('e1025ad revert enabling php-cs-fixer parallel processing by @kbond') ->assertOutputContains('[Full Change List](https://github.com/zenstruck/.github/commits/v0.1.0)') ; } @@ -192,7 +192,7 @@ public function next_minor_interactive_with_no_previous_release(): void ->assertSuccessful() ->assertOutputContains('Releasing as v0.1.0 (v0.1.0)') ->assertOutputContains('Generating changelog for zenstruck/.github:main') - ->assertOutputContains('f9489f5 Update MAINTENANCE.md by @kbond') + ->assertOutputContains('e1025ad revert enabling php-cs-fixer parallel processing by @kbond') ->assertOutputContains('Not creating release.') ; } @@ -209,7 +209,7 @@ public function next_patch_with_no_previous_release(): void ->assertSuccessful() ->assertOutputContains('Releasing as v0.0.1 (v0.0.1)') ->assertOutputContains('Generating changelog for zenstruck/.github:main') - ->assertOutputContains('f9489f5 Update MAINTENANCE.md by @kbond') + ->assertOutputContains('e1025ad revert enabling php-cs-fixer parallel processing by @kbond') ->assertOutputContains('[Full Change List](https://github.com/zenstruck/.github/commits/v0.0.1)') ; } @@ -226,7 +226,7 @@ public function next_patch_interactive_with_no_previous_release(): void ->assertSuccessful() ->assertOutputContains('Releasing as v0.0.1 (v0.0.1)') ->assertOutputContains('Generating changelog for zenstruck/.github:main') - ->assertOutputContains('f9489f5 Update MAINTENANCE.md by @kbond') + ->assertOutputContains('e1025ad revert enabling php-cs-fixer parallel processing by @kbond') ->assertOutputContains('Not creating release.') ; } @@ -280,7 +280,7 @@ public function next_override_with_no_previous_release(): void ->assertSuccessful() ->assertOutputContains('Releasing as v2.0.5 (v2.0.5)') ->assertOutputContains('Generating changelog for zenstruck/.github:main') - ->assertOutputContains('f9489f5 Update MAINTENANCE.md by @kbond') + ->assertOutputContains('e1025ad revert enabling php-cs-fixer parallel processing by @kbond') ->assertOutputContains('[Full Change List](https://github.com/zenstruck/.github/commits/v2.0.5)') ; } @@ -298,7 +298,7 @@ public function next_override_interactive_with_no_previous_release(): void ->assertSuccessful() ->assertOutputContains('Releasing as v2.0.5 (v2.0.5)') ->assertOutputContains('Generating changelog for zenstruck/.github:main') - ->assertOutputContains('f9489f5 Update MAINTENANCE.md by @kbond') + ->assertOutputContains('e1025ad revert enabling php-cs-fixer parallel processing by @kbond') ->assertOutputContains('Not creating release.') ; }