debian-mirror-gitlab/lib/api/project_events.rb

35 lines
810 B
Ruby
Raw Normal View History

2019-05-18 00:54:41 +05:30
# frozen_string_literal: true
module API
2021-01-03 14:25:43 +05:30
class ProjectEvents < ::API::Base
2019-05-18 00:54:41 +05:30
include PaginationParams
include APIGuard
helpers ::API::Helpers::EventsHelpers
2021-01-29 00:20:46 +05:30
feature_category :users
2022-06-21 17:19:12 +05:30
# TODO: Set higher urgency after resolving https://gitlab.com/gitlab-org/gitlab/-/issues/357839
urgency :low
2019-05-18 00:54:41 +05:30
params do
requires :id, type: String, desc: 'The ID of a project'
end
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
desc "List a Project's visible events" do
success Entities::Event
end
params do
use :pagination
use :event_filter_params
use :sort_params
end
get ":id/events" do
events = find_events(user_project)
present_events(events)
end
end
end
end