<commit_before>/* eslint-env mocha */
'use strict'

const expect = require('chai').expect
const execa = require('execa')
const fs = require('fs-extra')
const path = require('path')
const bin = require.resolve('../')
const os = require('os')

const dirs = {}

const git = {
  init: async (name) => {
    const source = path.join(__dirname, 'fixtures', 'test-dependant', name)
    dirs[name] = path.join(os.tmpdir(), `repo-${Math.random()}`)

    await fs.mkdir(dirs[name])
    await fs.copy(source, dirs[name])

    await execa('git', ['init'], {
      cwd: dirs[name]
    })
    await execa('git', ['config', 'user.email', '<EMAIL>'], {
      cwd: dirs[name]
    })
    await execa('git', ['config', 'user.name', 'test'], {
      cwd: dirs[name]
    })
    await git.add(name)
    await git.commit(name, 'initial commit')
  },
  add: async (name) => {
    await execa('git', ['add', '-A'], {
      cwd: dirs[name]
    })
  },
  commit: async (name, message) => {
    await execa('git', ['commit', '-m', message], {
      cwd: dirs[name]
    })
  }
}
<commit_msg>fix: disable gpg sign in tests<commit_after>/* eslint-env mocha */
'use strict'

const expect = require('chai').expect
const execa = require('execa')
const fs = require('fs-extra')
const path = require('path')
const bin = require.resolve('../')
const os = require('os')

const dirs = {}

const git = {
  init: async (name) => {
    const source = path.join(__dirname, 'fixtures', 'test-dependant', name)
    dirs[name] = path.join(os.tmpdir(), `repo-${Math.random()}`)

    await fs.mkdir(dirs[name])
    await fs.copy(source, dirs[name])

    await execa('git', ['init'], {
      cwd: dirs[name]
    })
    await execa('git', ['config', 'user.email', '<EMAIL>'], {
      cwd: dirs[name]
    })
    await execa('git', ['config', 'user.name', 'test'], {
      cwd: dirs[name]
    })
    await git.add(name)
    await git.commit(name, 'initial commit')
  },
  add: async (name) => {
    await execa('git', ['add', '-A'], {
      cwd: dirs[name]
    })
  },
  commit: async (name, message) => {
    await execa('git', ['commit', '-m', message, '--no-gpg-sign'], {
      cwd: dirs[name]
    })
  }
}

{'fraction_non_alphanumeric': 0.21408711770157554, 'fraction_numerical': 0.0, 'mean_word_length': 3.12810707456979, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '4085790', 'n_tokens_mistral': 791, 'n_tokens_neox': 802, 'n_words': 184}