Skip to content

Commit 983f32c

Browse files
committed
fix: update cache key construction for comment aggregation
1 parent 6193670 commit 983f32c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Jobs/ProcessAggregatedEvents.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(string $nodeId)
3232
*/
3333
public function handle(): void
3434
{
35-
$commentAggregationCacheKey = "comment_aggregation_{$this->nodeId}";
35+
$commentAggregationCacheKey = config('github-project.comment_aggregation_cache_key')."_{$this->nodeId}";
3636
$eventMessages = Cache::pull($commentAggregationCacheKey, []);
3737

3838
if (empty($eventMessages)) {
@@ -46,9 +46,9 @@ public function handle(): void
4646
$author = Cache::pull($commentAggregationCacheKey.'_author', '');
4747

4848
$message .= '\n\n'.view(
49-
'github-project::md.shared.author',
50-
['name' => $author['name'], 'html_url' => $author['html_url']]
51-
)->render();
49+
'github-project::md.shared.author',
50+
['name' => $author['name'], 'html_url' => $author['html_url']]
51+
)->render();
5252

5353
$githubService = new GithubService;
5454
$githubService->commentOnNode($this->nodeId, $message);

src/Jobs/ProcessWebhookEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(array $eventData)
3232
public function handle(): void
3333
{
3434
$nodeId = $this->eventData['projects_v2_item']['content_node_id'];
35-
$commentAggregationCacheKey = "comment_aggregation_{$nodeId}";
35+
$commentAggregationCacheKey = config('github-project.comment_aggregation_cache_key')."_{$nodeId}";
3636
$commentAggregationTime = (int) config('github-project.comment_aggregation_time');
3737

3838
$eventMessages = Cache::get($commentAggregationCacheKey, []);

0 commit comments

Comments
 (0)