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: note.rb
    path of file: ./repos/gitlabhq/lib/gitlab/data_builder
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Gitlab
  module DataBuilder
    module Note
      extend self

      # Produce a hash of post-receive dat
    
      def build_base_data(project, user, note)
        event_type = note.confidential?(include_noteable: true) ? 'confidential_note' : 'note'

        base_data = {
          object_kind: "note",
          event_type: event_type,
          user: user.hook_attrs,
          project_id: project.id,
          project: project.hook_attrs,
          object_attributes: note.hook_attrs,
          # DEPRECATED
          repository: project.hook_attrs.slice(:name, :url, :description, :homepage)
        }

        base_data[:object_attributes][:url] = Gitlab::UrlBuilder.build(note)
        base_data
      end