From 72817fd7c07d1b812623f8d5e27fc7bcecb4eed5 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Sat, 1 Feb 2020 00:08:41 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/models/release.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'app/models/release.rb') diff --git a/app/models/release.rb b/app/models/release.rb index ecfae554fe0..2543717895f 100644 --- a/app/models/release.rb +++ b/app/models/release.rb @@ -34,7 +34,6 @@ class Release < ApplicationRecord delegate :repository, to: :project - after_commit :create_evidence!, on: :create, unless: :importing? after_commit :notify_new_release, on: :create, unless: :importing? MAX_NUMBER_TO_DISPLAY = 3 @@ -70,6 +69,10 @@ class Release < ApplicationRecord released_at.present? && released_at > Time.zone.now end + def historical_release? + released_at.present? && released_at < created_at + end + def name self.read_attribute(:name) || tag end @@ -98,10 +101,6 @@ class Release < ApplicationRecord end end - def create_evidence! - CreateEvidenceWorker.perform_async(self.id) - end - def notify_new_release NewReleaseWorker.perform_async(id) end -- cgit v1.2.1