<commit_before>class Assignment < ActiveRecord::Base
  include GitHubPlan
<<<<<<< 1f33d1c169ab0aa2661263c2fbbf073f9adce906
  include Sluggable
=======

  update_index('stafftools#assignment') { self }

  extend FriendlyId
  friendly_id :title, use: [:slugged, :finders]
>>>>>>> add index updating to the rest of the resources

  default_scope { where(deleted_at: nil) }

  has_one :assignment_invitation, dependent: :destroy, autosave: true

  has_many :assignment_repos, dependent: :destroy
  has_many :repo_accesses,    through:   :assignment_repos
  has_many :users,            through:   :repo_accesses

  belongs_to :creator, class_name: User
  belongs_to :organization

  validates :creator, presence: true

  validates :organization, presence: true

  validates :title, presence: true
  validates :title, length: { maximum: 60 }

  validates :slug, uniqueness: { scope: :organization_id }

  validate :uniqueness_of_slug_across_organization

  alias_attribute :invitation, :assignment_invitation

  def private?
    !public_repo
  end<commit_msg>rebasing man...<commit_after>class Assignment < ActiveRecord::Base
  include GitHubPlan
  include Sluggable

  update_index('stafftools#assignment') { self }

  default_scope { where(deleted_at: nil) }

  has_one :assignment_invitation, dependent: :destroy, autosave: true

  has_many :assignment_repos, dependent: :destroy
  has_many :repo_accesses,    through:   :assignment_repos
  has_many :users,            through:   :repo_accesses

  belongs_to :creator, class_name: User
  belongs_to :organization

  validates :creator, presence: true

  validates :organization, presence: true

  validates :title, presence: true
  validates :title, length: { maximum: 60 }

  validates :slug, uniqueness: { scope: :organization_id }

  validate :uniqueness_of_slug_across_organization

  alias_attribute :invitation, :assignment_invitation

  def private?
    !public_repo
  end
{'fraction_non_alphanumeric': 0.08722741433021806, 'fraction_numerical': 0.014018691588785047, 'mean_word_length': 4.947530864197531, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 10, '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': '2325157', 'n_tokens_mistral': 648, 'n_tokens_neox': 599, 'n_words': 151}