<commit_before>class Note < ActiveRecord::Base
  FIX = "fix"
  MAJOR = "major"
  MINOR = "minor"

  has_and_belongs_to_many :reports
  has_one :converted_pull_request, dependent: :destroy
  belongs_to :project, touch: true

  before_save :set_published_at_if_published

  def set_published_at_if_published
    self.published_at = Time.now if self.published_changed? && self.published?
  end

  def html_body
    markdowner.render(markdown_body)
  end<commit_msg>don't remove a converted PR when note is deleted<commit_after>class Note < ActiveRecord::Base
  FIX = "fix"
  MAJOR = "major"
  MINOR = "minor"

  has_and_belongs_to_many :reports
  has_one :converted_pull_request
  belongs_to :project, touch: true

  before_save :set_published_at_if_published

  def set_published_at_if_published
    self.published_at = Time.now if self.published_changed? && self.published?
  end

  def html_body
    markdowner.render(markdown_body)
  end
{'fraction_non_alphanumeric': 0.07462686567164178, 'fraction_numerical': 0.0, 'mean_word_length': 4.832298136645963, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2439025', 'n_tokens_mistral': 330, 'n_tokens_neox': 314, 'n_words': 71}