Skip to content

Commit 389b69b

Browse files
committed
fix: improve comment display by defining variables for field changes
1 parent b809bf5 commit 389b69b

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
**{{ '@'.$editor }}** updated **{{ $fieldName }}** from **{{ $fromValue }}** to **{{ $toValue }}**.
2-
3-
@include('github-project::md.field_types.' . $payload['projects_v2_item']['field_type'], compact('payload'))
1+
@php
2+
$fieldName = $payload['projects_v2_item']['field_name'];
3+
$fromValue = $payload['from']['name'] ?? 'Unknown';
4+
$toValue = $payload['to']['name'] ?? 'Unknown';
5+
@endphp
6+
@include(
7+
'github-project::md.field_types.' . $payload['projects_v2_item']['field_type'],
8+
compact('fieldName', 'fromValue', 'toValue')
9+
)
410

511
@include('github-project::md.shared.author', compact('payload'))
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**{{ $fieldName }}** has been changed from **{{ $fromValue }}** to **{{ $toValue }}**.

0 commit comments

Comments
 (0)