summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-02-19 05:02:57 +0000
committerDouwe Maan <douwe@gitlab.com>2015-03-03 11:14:31 +0100
commitafe5d7d209a4088d71e35d6382e6523b89f94ebe (patch)
treea3432580bee64e1c9f30b0815426c31e3220d021 /db
parent2f4656b5c7e2a9b351237432e76a7b928a1684b1 (diff)
downloadgitlab-ce-afe5d7d209a4088d71e35d6382e6523b89f94ebe.tar.gz
Issue #595: Support Slack notifications upon issue and merge request events
1) Adds a DB migration for all services to toggle on push, issue, and merge events. 2) Upon an issue or merge request event, fire service hooks. 3) Slack service supports custom messages for each of these events. Other services not supported at the moment. 4) Label merge request hooks with their corresponding actions.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20150219004514_add_events_to_services.rb8
-rw-r--r--db/schema.rb8
2 files changed, 14 insertions, 2 deletions
diff --git a/db/migrate/20150219004514_add_events_to_services.rb b/db/migrate/20150219004514_add_events_to_services.rb
new file mode 100644
index 00000000000..cf73a0174f4
--- /dev/null
+++ b/db/migrate/20150219004514_add_events_to_services.rb
@@ -0,0 +1,8 @@
+class AddEventsToServices < ActiveRecord::Migration
+ def change
+ add_column :services, :push_events, :boolean, :default => true
+ add_column :services, :issues_events, :boolean, :default => true
+ add_column :services, :merge_requests_events, :boolean, :default => true
+ add_column :services, :tag_push_events, :boolean, :default => true
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 2659efe4df9..1a9b512e159 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -364,9 +364,13 @@ ActiveRecord::Schema.define(version: 20150223022001) do
t.integer "project_id"
t.datetime "created_at"
t.datetime "updated_at"
- t.boolean "active", default: false, null: false
+ t.boolean "active", default: false, null: false
t.text "properties"
- t.boolean "template", default: false
+ t.boolean "template", default: false
+ t.boolean "push_events", default: true
+ t.boolean "issues_events", default: true
+ t.boolean "merge_requests_events", default: true
+ t.boolean "tag_push_events", default: true
end
add_index "services", ["created_at", "id"], name: "index_services_on_created_at_and_id", using: :btree