Skip to content
Snippets Groups Projects

357773: Add Retrieve label events by project via the API

6 unresolved threads
5 files
+ 24
18
Compare changes
  • Side-by-side
  • Inline
Files
5
  • 44c23fe6
    Renamed the Finder to fix the Gitlab/NamespacedClass cop violation
    Also renamed the scopes to be more descriptive and added a new
    scope in ResourceEvent to match the created_before. The latter
    allows us not to defined created_after for each event type.
    
    Moved the find method into the Finder and call it from there
    within the API call.
# frozen_string_literal: true
module ResourceLabelEvents
class EventsFinder
include FinderMethods
def initialize(current_user, eventable)
@current_user = current_user
@eventable = eventable
end
def find_project_eventable(id)
ResourceLabelEvent.find_project_events(id)
end
private
attr_reader :current_user, :eventable
end
end
Loading