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

class MilestoneRelease < ApplicationRecord
  extend SuppressCompositePrimaryKeyWarning

  belongs_to :milestone

    
  def same_project_between_milestone_and_release
    return if milestone&.project_id == release&.project_id

    return if milestone&.group_id

    errors.add(:base, _('Release does not have the same project as the milestone'))
  end
end