slack:
This commit is contained in:
parent
644856b1dd
commit
21e920079f
@ -4,10 +4,53 @@ require "net/http"
|
||||
namespace :slack do
|
||||
desc "TODO"
|
||||
task webhook: :environment do
|
||||
time = Time.new
|
||||
|
||||
out = {}
|
||||
out[:text] = "Hello World"
|
||||
out[:color] = "good"
|
||||
out[:pretext] = "pretext!"
|
||||
out[:text] = "Last updated at #{time.strftime("%Y-%m-%d %Hgg:%M:%S")}"
|
||||
out[:color] = "#829495"
|
||||
out[:pretext] = "Roadmap"
|
||||
out[:fields] = []
|
||||
|
||||
column_1 = {}
|
||||
column_1[:title] = "Active Project(s)"
|
||||
column_1[:value] = "<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>"
|
||||
column_1[:short] = true
|
||||
|
||||
column_2 = {}
|
||||
column_2[:title] = "Furthest Status"
|
||||
column_2[:value] = "Planning\nPlanning\nComplete\nOverdue :warning:"
|
||||
column_2[:short] = true
|
||||
|
||||
out[:fields] << column_1
|
||||
out[:fields] << column_2
|
||||
|
||||
column_1 = {}
|
||||
column_1[:title] = "Upcoming Project(s)"
|
||||
column_1[:value] = "<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>"
|
||||
column_1[:short] = true
|
||||
|
||||
column_2 = {}
|
||||
column_2[:title] = "Furthest Status"
|
||||
column_2[:value] = "Planning\nPlanning\nComplete\nOverdue :warning:"
|
||||
column_2[:short] = true
|
||||
|
||||
out[:fields] << column_1
|
||||
out[:fields] << column_2
|
||||
|
||||
column_1 = {}
|
||||
column_1[:title] = "Backlog Project(s)"
|
||||
column_1[:value] = "<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>"
|
||||
column_1[:short] = true
|
||||
|
||||
column_2 = {}
|
||||
column_2[:title] = "Furthest Status"
|
||||
column_2[:value] = "Planning\nPlanning\nComplete\nOverdue :warning:"
|
||||
column_2[:short] = true
|
||||
|
||||
out[:fields] << column_1
|
||||
out[:fields] << column_2
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user