You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: autocomplete_service.rb
    path of file: ./repos/gitlabhq/app/services/projects
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Projects
  class AutocompleteService < BaseService
    include LabelsAsHash
    def issues
      IssuesFinder.new(current_user, project_id: project.id, state: 'opened').execute.select([:iid, :title])
    end

    def milestones
      finder_params = {
        project_ids: [@project.id],
        state: :active,
        order: { due_date: :asc, ti
    
    def contacts(target)
      available_contacts = Crm::ContactsFinder.new(current_user, group: project.group).execute
        .select([:id, :email, :first_name, :last_name, :state])

      contact_hashes = available_contacts.as_json

      return contact_hashes unless target.is_a?(Issue)

      ids = target.customer_relations_contacts.ids # rubocop:disable CodeReuse/ActiveRecord

      contact_hashes.each do |hash|
        hash[:set] = ids.include?(hash['id'])
      end

      contact_hashes
    end