1ea2d9faa5
This commit introduces Releases API under /api/v4/projects/:id/releases * We are introducing release policies at project level. * We are deprecating releases changes from tags, both api and web interface. * Tags::CreateService no longer create a release This feature is controlled by :releases_page feature flag
16 lines
398 B
Ruby
16 lines
398 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ReleasesFinder
|
|
def initialize(project, current_user = nil)
|
|
@project = project
|
|
@current_user = current_user
|
|
end
|
|
|
|
# rubocop: disable CodeReuse/ActiveRecord
|
|
def execute
|
|
return [] unless Ability.allowed?(@current_user, :read_release, @project)
|
|
|
|
@project.releases.order('created_at DESC')
|
|
end
|
|
# rubocop: enable CodeReuse/ActiveRecord
|
|
end
|