{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/slack-notification-channel/issues/6","repository_url":"https://api.github.com/repos/laravel/slack-notification-channel","labels_url":"https://api.github.com/repos/laravel/slack-notification-channel/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/laravel/slack-notification-channel/issues/6/comments","events_url":"https://api.github.com/repos/laravel/slack-notification-channel/issues/6/events","html_url":"https://github.com/laravel/slack-notification-channel/pull/6","id":388650481,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2ODY0NjQ4","number":6,"title":"[1.0] Add actions (buttons) to attachments","user":{"login":"Jeroen-G","id":1116853,"node_id":"MDQ6VXNlcjExMTY4NTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1116853?v=4","gravatar_id":"","url":"https://api.github.com/users/Jeroen-G","html_url":"https://github.com/Jeroen-G","followers_url":"https://api.github.com/users/Jeroen-G/followers","following_url":"https://api.github.com/users/Jeroen-G/following{/other_user}","gists_url":"https://api.github.com/users/Jeroen-G/gists{/gist_id}","starred_url":"https://api.github.com/users/Jeroen-G/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jeroen-G/subscriptions","organizations_url":"https://api.github.com/users/Jeroen-G/orgs","repos_url":"https://api.github.com/users/Jeroen-G/repos","events_url":"https://api.github.com/users/Jeroen-G/events{/privacy}","received_events_url":"https://api.github.com/users/Jeroen-G/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-07T13:15:47Z","updated_at":"2018-12-07T14:05:49Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/laravel/slack-notification-channel/pulls/6","html_url":"https://github.com/laravel/slack-notification-channel/pull/6","diff_url":"https://github.com/laravel/slack-notification-channel/pull/6.diff","patch_url":"https://github.com/laravel/slack-notification-channel/pull/6.patch"},"body":"This PR adds the option to show buttons, called actions, under attachments in Slack notifications.\r\n\r\nSlack API: https://api.slack.com/docs/message-attachments#action_fields\r\n\r\nHow it could look:\r\n![afbeelding](https://user-images.githubusercontent.com/1116853/49649717-3df77c80-fa2a-11e8-9c13-dd5213846e49.png)\r\n\r\nHow this would look in the notification class:\r\n\r\n```php\r\npublic function toSlack($notifiable): SlackMessage\r\n    {\r\n        return (new SlackMessage())\r\n            ->error()\r\n            ->attachment(function (SlackAttachment $attachment) {\r\n                $attachment\r\n                    ->title('🚨 '.$this->site->name.' lijkt offline.')\r\n                    ->content('URL: '.$this->url)\r\n                    ->action('🔎  Monitor openen', url('/'));\r\n            });\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/laravel/slack-notification-channel/issues/comments/445242390","html_url":"https://github.com/laravel/slack-notification-channel/pull/6#issuecomment-445242390","issue_url":"https://api.github.com/repos/laravel/slack-notification-channel/issues/6","id":445242390,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTI0MjM5MA==","user":{"login":"Jeroen-G","id":1116853,"node_id":"MDQ6VXNlcjExMTY4NTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1116853?v=4","gravatar_id":"","url":"https://api.github.com/users/Jeroen-G","html_url":"https://github.com/Jeroen-G","followers_url":"https://api.github.com/users/Jeroen-G/followers","following_url":"https://api.github.com/users/Jeroen-G/following{/other_user}","gists_url":"https://api.github.com/users/Jeroen-G/gists{/gist_id}","starred_url":"https://api.github.com/users/Jeroen-G/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jeroen-G/subscriptions","organizations_url":"https://api.github.com/users/Jeroen-G/orgs","repos_url":"https://api.github.com/users/Jeroen-G/repos","events_url":"https://api.github.com/users/Jeroen-G/events{/privacy}","received_events_url":"https://api.github.com/users/Jeroen-G/received_events","type":"User","site_admin":false},"created_at":"2018-12-07T14:05:49Z","updated_at":"2018-12-07T14:05:49Z","author_association":"NONE","body":"Now it does 😄 "}}
{"actor":{"display_login":"Jeroen-G"}}