<commit_before># frozen_string_literal: true

# A few Rubocop cops are disabled in this file because it's pending a refactor.
# See https://github.com/hackclub/api/issues/25.
module Hackbot
  module Interactions
    class CheckIn < TextConversation
      include Concerns::LeaderAssociable
      include Concerns::Triggerable
      include Concerns::Followupable

      TASK_ASSIGNEE = Rails.application.secrets.default_streak_task_assignee
      SURVEY_WEEK = true

      def should_start?
        false
      end

      def start
        first_name = leader.name.split(' ').first
        flavor_text = copy('greeting.flavor_text')
        deadline = formatted_deadline leader
        key = 'greeting.' + (first_check_in? ? 'if_first_check_in' : 'default')
        key = 'greeting.restart' if @restart

        msg_channel copy(key,
                         first_name: first_name,
                         flavor_text: flavor_text,
                         deadline: deadline)
        SURVEY_WEEK ? initialize_survey_questions : initialize_weekly_questions
      end

      def wait_for_nps_score<commit_msg>Remove 3rd survey of 2018 Q1<commit_after># frozen_string_literal: true

# A few Rubocop cops are disabled in this file because it's pending a refactor.
# See https://github.com/hackclub/api/issues/25.
module Hackbot
  module Interactions
    class CheckIn < TextConversation
      include Concerns::LeaderAssociable
      include Concerns::Triggerable
      include Concerns::Followupable

      TASK_ASSIGNEE = Rails.application.secrets.default_streak_task_assignee
      SURVEY_WEEK = false

      def should_start?
        false
      end

      def start
        first_name = leader.name.split(' ').first
        flavor_text = copy('greeting.flavor_text')
        deadline = formatted_deadline leader
        key = 'greeting.' + (first_check_in? ? 'if_first_check_in' : 'default')
        key = 'greeting.restart' if @restart

        msg_channel copy(key,
                         first_name: first_name,
                         flavor_text: flavor_text,
                         deadline: deadline)
        SURVEY_WEEK ? initialize_survey_questions : initialize_weekly_questions
      end

      def wait_for_nps_score
{'fraction_non_alphanumeric': 0.06708407871198568, 'fraction_numerical': 0.004472271914132379, 'mean_word_length': 2.506269592476489, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4034784', 'n_tokens_mistral': 689, 'n_tokens_neox': 647, 'n_words': 150}