<commit_before>import { IGroup } from '../../interfaces/IGroup';
import { IRepo } from '../../interfaces/IRepo';

import * as React from 'react';
import * as moment from 'moment';
import { basename } from 'path';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
const Isvg = require('react-inlinesvg');

import actionsToConnect from '../../actions';
import { renderLog } from '../../helpers/logger';
import Icon from '../helpers/Icon';
import Status from './Status';
import StyledRepo from './StyledRepo';

const updateDate = (repo, el) => {
  setTimeout(() => {
    if (el && el.innerHTML) {
      el.innerHTML = moment(repo.lastUpdate).fromNow();
      updateDate(repo, el);
    }
  }, 5 * 60 * 1000); // 5 minutes
};

interface IRepoComponent {
  repo: IRepo;
  group: IGroup;
  actions: any;
}

function RepoComponent ({repo, group, actions}: IRepoComponent) {
  renderLog('REPO', repo.name || basename(repo.dir));
  let cls = '';

  if (repo.behind) {
    cls = 'behind';
  } else if (repo.ahead) {<commit_msg>reloading repos every 5 min<commit_after>import { IGroup } from '../../interfaces/IGroup';
import { IRepo } from '../../interfaces/IRepo';

import * as React from 'react';
import * as moment from 'moment';
import { basename } from 'path';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
const Isvg = require('react-inlinesvg');

import actionsToConnect from '../../actions';
import { renderLog } from '../../helpers/logger';
import Icon from '../helpers/Icon';
import Status from './Status';
import StyledRepo from './StyledRepo';

const updateDate = (repo, el) => {
  setTimeout(() => {
    if (el && el.innerHTML) {
      el.innerHTML = moment(repo.lastUpdate).fromNow();
      updateDate(repo, el);
    }
  }, 5 * 60 * 1000); // 5 minutes
};

interface IRepoComponent {
  repo: IRepo;
  group: IGroup;
  actions: any;
}

function RepoComponent ({repo, group, actions}: IRepoComponent) {
  renderLog('REPO', repo.name || basename(repo.dir));

  if (!repo.progressing) {
    setTimeout(() => {
      actions.reloadRepo(repo.id, repo.dir);
    }, 5 * 60 * 1000); // 5 minutes
  }

  let cls = '';

  if (repo.behind) {
    cls = 'behind';
  } else if (repo.ahead) {
{'fraction_non_alphanumeric': 0.17563361493997331, 'fraction_numerical': 0.011116051578479324, 'mean_word_length': 3.437869822485207, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '353007', 'n_tokens_mistral': 742, 'n_tokens_neox': 727, 'n_words': 206}