diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-01 03:08:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-01 03:08:41 +0300 |
commit | 72817fd7c07d1b812623f8d5e27fc7bcecb4eed5 (patch) | |
tree | 2e81b28a062212375bf17d1da0ff836d6b021469 /app/models/release.rb | |
parent | 9db503ef9888c984b287af44d009d884e835ce04 (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, 4 insertions, 5 deletions
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 |