diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-07 03:08:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-07 03:08:58 +0300 |
commit | b45d30ab76e55c9e2889263c7a29de5a48d6ec56 (patch) | |
tree | b9a34518887b942af58673318c6478d144ddde2d /app/models/release.rb | |
parent | 63c5b4906b330d3ad4100446d149eaf6f65e6d82 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/release.rb')
-rw-r--r-- | app/models/release.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/release.rb b/app/models/release.rb index f2162a0f674..c56df0a6aa3 100644 --- a/app/models/release.rb +++ b/app/models/release.rb @@ -83,6 +83,15 @@ class Release < ApplicationRecord self.milestones.map {|m| m.title }.sort.join(", ") end + def to_hook_data(action) + Gitlab::HookData::ReleaseBuilder.new(self).build(action) + end + + def execute_hooks(action) + hook_data = to_hook_data(action) + project.execute_hooks(hook_data, :release_hooks) + end + private def actual_sha |