From 2a6b3d5f5400e3040894e10eaecf1636852082c7 Mon Sep 17 00:00:00 2001 From: Uladzimir Tsykun Date: Tue, 26 Sep 2023 22:53:23 +0200 Subject: [PATCH] Fix update review stop working --- src/Integrations/Base/AppIntegrationTrait.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Integrations/Base/AppIntegrationTrait.php b/src/Integrations/Base/AppIntegrationTrait.php index 3a323228..73803a53 100644 --- a/src/Integrations/Base/AppIntegrationTrait.php +++ b/src/Integrations/Base/AppIntegrationTrait.php @@ -294,13 +294,13 @@ protected function pullRequestReview(App $app, array $payload, callable $request $key = "repo:$name:$iid"; $commentId = null; - if (false === $this->redis->hSetNx($setId, $key, 0)) { - $commentId = $this->redis->hGet($setId, $key); + if (false === $this->redis->hSetNx($setId, $key, '0')) { + $commentId = (int)$this->redis->hGet($setId, $key); } if ($commentId === null) { $review = $request("POST", $diff); - $this->redis->hSet($setId, $key, $review['id']); + $this->redis->hSet($setId, $key, (string)$review['id']); $this->redis->hSet($setId, "$key:diff", sha1($diff)); return []; }