Sha256: eb6fc2bb40e79221cb36bd32868900c54a2a1457874f78a89cd7117d27fa1420
Contents?: true
Size: 454 Bytes
Versions: 11
Compression:
Stored size: 454 Bytes
Contents
Houston::Slack.config do overhear(/\b(?<task>\d+[a-z]+)\b/) do |e| next unless e.user tasks = Task.joins(:ticket) if project = e.channel.name != "test" && Project.find_by_slug(e.channel.name) tasks = tasks.where(Ticket.arel_table[:project_id].eq(project.id)) else tasks = tasks.merge(Ticket.open) end tasks.with_shorthand(e.match[:task]).each do |task| e.unfurl slack_task_attachment(task) end end end
Version data entries
11 entries across 11 versions & 1 rubygems