Add ticket create notification event support
linter / quality (pull_request) Successful in 1m25s
tests / ci (8.4) (pull_request) Successful in 1m42s

This commit is contained in:
2026-04-24 19:35:13 +00:00
parent 083328f9de
commit 5f74ddd964
12 changed files with 262 additions and 18 deletions
@@ -22,8 +22,8 @@ final readonly class TicketStatusChangedPayload implements Arrayable
public string $ticketUrl,
public ?int $actorId,
public ?string $actorName,
public int $fromStatusId,
public string $fromStatusLabel,
public ?int $fromStatusId,
public ?string $fromStatusLabel,
public int $toStatusId,
public string $toStatusLabel,
public CarbonImmutable $occurredAt,
@@ -35,7 +35,7 @@ final readonly class TicketStatusChangedPayload implements Arrayable
* project: array{id: int, key: string, name: string},
* ticket: array{id: int, key: string, title: string},
* actor: array{id: int, name: string}|null,
* from: array{id: int, label: string},
* from: array{id: int, label: string}|null,
* to: array{id: int, label: string},
* ticket_url: string,
* occurred_at: string
@@ -61,10 +61,12 @@ final readonly class TicketStatusChangedPayload implements Arrayable
'id' => $this->actorId,
'name' => $this->actorName,
],
'from' => [
'id' => $this->fromStatusId,
'label' => $this->fromStatusLabel,
],
'from' => $this->fromStatusId === null || $this->fromStatusLabel === null
? null
: [
'id' => $this->fromStatusId,
'label' => $this->fromStatusLabel,
],
'to' => [
'id' => $this->toStatusId,
'label' => $this->toStatusLabel,