debian-mirror-gitlab/app/controllers/groups/releases_controller.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
770 B
Ruby
Raw Normal View History

2020-10-24 23:57:45 +05:30
# frozen_string_literal: true
module Groups
class ReleasesController < Groups::ApplicationController
2021-01-03 14:25:43 +05:30
feature_category :release_evidence
2020-10-24 23:57:45 +05:30
def index
respond_to do |format|
format.json do
render json: ReleaseSerializer.new.represent(releases)
end
end
end
private
def releases
2022-05-07 20:08:51 +05:30
if Feature.enabled?(:group_releases_finder_inoperator)
Releases::GroupReleasesFinder
2022-06-21 17:19:12 +05:30
.new(@group, current_user)
2022-05-07 20:08:51 +05:30
.execute(preload: false)
2022-06-21 17:19:12 +05:30
.page(params[:page])
.per(30)
2022-05-07 20:08:51 +05:30
else
ReleasesFinder
.new(@group, current_user, { include_subgroups: true })
.execute(preload: false)
.page(params[:page])
.per(30)
end
2020-10-24 23:57:45 +05:30
end
end
end