mrbase / cachet-slack-integration

MIT License
10 stars 5 forks source link

cachet event changes and route issue #7

Open epolancog opened 3 years ago

epolancog commented 3 years ago

hey, thanks for creating this one.

I wanted to share a quick fix for the new incidents not being notified (the cachet events changed slightly) image

IncidentWasReportedEvent by IncidentWasCreatedEvent

In addition, unless we are missing to add an env variable or something we always get a

InvalidArgumentException
Route [status-page] not defined

when trying to update an incident (and it will fail for new incidents once the events are renamed correctly), because status-page is never set in the cachet-slack-integration project for the title-link field here:

$this->attachment = [
            'fallback'   => trans('slack::messages.incident.updated.fallback', $this->replacements),
            'color'      => $this->statusToColor($newStatus),
            'title'      => trans('slack::messages.incident.updated.title', $this->replacements),
            'title_link' => route('status-page'),
            'text'       => $message,
            'fields'     => [

I assume the best way should be to change it to url('status-page') like you used to have it before or use an env variable. Any suggestion for this last one?

Thanks in advance