diff options
author | Duana Saskia <starkcoffee@users.noreply.github.com> | 2018-06-07 09:35:17 +0200 |
---|---|---|
committer | Duana Saskia <starkcoffee@users.noreply.github.com> | 2018-08-13 13:20:58 +0200 |
commit | ece6a1ea6ecffdbde5ff7d663f1ad1eb74f78aa6 (patch) | |
tree | 288e34ff932b6c84e1a1c5ead26cbd8f80ea12f5 /db | |
parent | 07356866b2ce85f4d724c96f14e129fbe6a56963 (diff) | |
download | gitlab-ce-ece6a1ea6ecffdbde5ff7d663f1ad1eb74f78aa6.tar.gz |
Filter project hooks by branch
Allow specificying a branch filter for a project hook and only trigger
a project hook if either the branch filter is blank or the branch matches.
Only supported for push_events for now.
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180607071808_add_push_events_branch_filter_to_web_hooks.rb | 12 | ||||
-rw-r--r-- | db/schema.rb | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20180607071808_add_push_events_branch_filter_to_web_hooks.rb b/db/migrate/20180607071808_add_push_events_branch_filter_to_web_hooks.rb new file mode 100644 index 00000000000..6a69460e611 --- /dev/null +++ b/db/migrate/20180607071808_add_push_events_branch_filter_to_web_hooks.rb @@ -0,0 +1,12 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddPushEventsBranchFilterToWebHooks < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + add_column :web_hooks, :push_events_branch_filter, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index f1d8f4df3b7..16ae2565c93 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2239,6 +2239,7 @@ ActiveRecord::Schema.define(version: 20180807153545) do t.boolean "repository_update_events", default: false, null: false t.boolean "job_events", default: false, null: false t.boolean "confidential_note_events" + t.text "push_events_branch_filter" end add_index "web_hooks", ["project_id"], name: "index_web_hooks_on_project_id", using: :btree |