diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-28 18:08:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-28 18:08:49 +0300 |
commit | 77d49e6a73b3a1e142ec865d05dc3dd9a708ab6a (patch) | |
tree | 8b208f19500d18308b47807d6d2f58262752afaa /app/models/operations | |
parent | 24e7d185395af41290e5622cad160b7efe230145 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/operations')
-rw-r--r-- | app/models/operations/feature_flag.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/models/operations/feature_flag.rb b/app/models/operations/feature_flag.rb index 104338b80d1..c9e52fe51f2 100644 --- a/app/models/operations/feature_flag.rb +++ b/app/models/operations/feature_flag.rb @@ -2,6 +2,7 @@ module Operations class FeatureFlag < ApplicationRecord + include AfterCommitQueue include AtomicInternalId include IidRoutes include Limitable @@ -77,6 +78,22 @@ module Operations Ability.issues_readable_by_user(issues, current_user) end + def execute_hooks(current_user) + run_after_commit do + feature_flag_data = Gitlab::DataBuilder::FeatureFlag.build(self, current_user) + project.execute_hooks(feature_flag_data, :feature_flag_hooks) + end + end + + def hook_attrs + { + id: id, + name: name, + description: description, + active: active + } + end + private def version_associations |