<commit_before>node[:deploy].each do |application, deploy|
  token = deploy[:chatwork_token]
  room  = deploy[:chatwork_room_id]
  return true if token.nil? || room.nil?
  return true if deploy[:scm].nil? || deploy[:deploying_user].nil?
  user = deploy[:deploying_user].split('/')[1]
  Log.logger.info "deploy[:notifying_nodes]"
  Log.logger.info deploy[:notifying_nodes]
  return true if deploy[:notifying_nodes].nil?
  return true unless deploy[:notifying_nodes].kind_of?(Array)
  return true if deploy[:notifying_nodes].include?(node[:hostname])

  execute 'post notification to chatwork' do
    command "curl -X POST -H \"X-ChatWorkToken: #{token}\" -d \"body=Application+#{application}+deployed+by+#{user}\" \"https://api.chatwork.com/v1/rooms/#{room}/messages\""
    action :run
  end
end<commit_msg>Fix hostname<commit_after>node[:deploy].each do |application, deploy|
  token = deploy[:chatwork_token]
  room  = deploy[:chatwork_room_id]
  return true if token.nil? || room.nil?
  return true if deploy[:scm].nil? || deploy[:deploying_user].nil?
  user = deploy[:deploying_user].split('/')[1]
  Log.logger.info "deploy[:notifying_nodes]"
  Log.logger.info deploy[:notifying_nodes]
  return true if deploy[:notifying_nodes].nil?
  return true unless deploy[:notifying_nodes].kind_of?(Array)
  return true if deploy[:notifying_nodes].include?(node[:opsworks][:instance][:hostname])

  execute 'post notification to chatwork' do
    command "curl -X POST -H \"X-ChatWorkToken: #{token}\" -d \"body=Application+#{application}+deployed+by+#{user}\" \"https://api.chatwork.com/v1/rooms/#{room}/messages\""
    action :run
  end
end
{'fraction_non_alphanumeric': 0.16289038579301898, 'fraction_numerical': 0.002449479485609308, 'mean_word_length': 5.433070866141732, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3595533', 'n_tokens_mistral': 542, 'n_tokens_neox': 536, 'n_words': 112}