Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-07 03:08:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-07 03:08:58 +0300
commitb45d30ab76e55c9e2889263c7a29de5a48d6ec56 (patch)
treeb9a34518887b942af58673318c6478d144ddde2d /app/models/release.rb
parent63c5b4906b330d3ad4100446d149eaf6f65e6d82 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/release.rb')
-rw-r--r--app/models/release.rb9
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