Method: Tokite::HookEvent::PullRequest#slack_attachment

Defined in:
app/models/tokite/hook_event/pull_request.rb

#slack_attachmentObject



39
40
41
42
43
44
45
46
47
# File 'app/models/tokite/hook_event/pull_request.rb', line 39

def slack_attachment
  {
    title: "##{hook_params[:pull_request][:number]} #{hook_params[:pull_request][:title]}",
    title_link: hook_params[:pull_request][:html_url],
    fallback: "#{hook_params[:pull_request][:title]}\n#{hook_params[:pull_request][:body]}",
    text: hook_params[:pull_request][:body] || "No description provided.",
    color: "good",
  }
end