Skip to content

Commit bec9aa5

Browse files
When informing about a process, a notification type output and its identifier have been added
1 parent a39eb01 commit bec9aa5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app/Data/NotificationData.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class NotificationData extends Data
1818

1919
public string $repository;
2020

21+
public string $title;
22+
2123
public function __construct(array $data)
2224
{
2325
$this->id = (int) $this->get($data, 'id');
@@ -28,6 +30,8 @@ public function __construct(array $data)
2830
$this->fullName = $this->get($data, 'repository.full_name');
2931
$this->organization = $this->get($data, 'repository.owner.login');
3032
$this->repository = $this->get($data, 'repository.name');
33+
34+
$this->title = sprintf('%s: %s #%d', $this->fullName, $this->type, $this->issueId);
3135
}
3236

3337
protected function issueId(array $data): int

app/Services/GitHub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ public function mark(): void
8181
$item = new ItemData($this->requestByType($notification));
8282

8383
$this->shouldSkip($notification, $item)
84-
? $this->output->twoColumnDetail($notification->fullName, 'SKIP')
85-
: $this->output->task($notification->fullName, fn () => $this->markAsRead($notification));
84+
? $this->output->twoColumnDetail($notification->title, 'SKIP')
85+
: $this->output->task($notification->title, fn () => $this->markAsRead($notification));
8686
}
8787
}
8888

0 commit comments

Comments
 (0)