<commit_before>import { execFile } from 'mz/child_process';
import { readFile } from 'mz/fs';
import { join } from 'path';
import getLatestVersion from './getLatestVersion';

let commit = true;

for (let i = 2; i < process.argv.length; i++) {
  switch (process.argv[i]) {
    case '--no-commit':
      commit = false;
      break;

    default:
      console.error('error: unexpected argument:', process.argv[i]);
      console.error('update-website [--no-commit|--force]');
      process.exit(-1);
  }
}

async function pkg(): Promise<{}> {
  let content = await readFile(join(__dirname, '../package.json'), { encoding: 'utf8' });
  return JSON.parse(content);
}

async function configureGithubRemote(name: string, project: string): Promise<void> {
  let githubToken = process.env['GH_TOKEN'];
  let url = githubToken ? `https://${githubToken}@github.com/${project}.git` : `https://github.com/${project}.git`;

  try {
    await run('git', ['remote', 'remove', 'website']);
  } catch (err) {<commit_msg>chore(website): improve finding Github token<commit_after>import { execFile } from 'mz/child_process';
import { readFile } from 'mz/fs';
import { join } from 'path';
import getLatestVersion from './getLatestVersion';

let commit = true;

for (let i = 2; i < process.argv.length; i++) {
  switch (process.argv[i]) {
    case '--no-commit':
      commit = false;
      break;

    default:
      console.error('error: unexpected argument:', process.argv[i]);
      console.error('update-website [--no-commit|--force]');
      process.exit(-1);
  }
}

async function pkg(): Promise<{}> {
  let content = await readFile(join(__dirname, '../package.json'), { encoding: 'utf8' });
  return JSON.parse(content);
}

async function configureGithubRemote(name: string, project: string): Promise<void> {
  let githubToken = process.env['GH_TOKEN'] || process.env['GITHUB_TOKEN'];
  let url = githubToken ? `https://${githubToken}@github.com/${project}.git` : `https://github.com/${project}.git`;

  try {
    await run('git', ['remote', 'remove', 'website']);
  } catch (err) {
{'fraction_non_alphanumeric': 0.1855072463768116, 'fraction_numerical': 0.002898550724637681, 'mean_word_length': 3.9783653846153846, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '5491073', 'n_tokens_mistral': 674, 'n_tokens_neox': 663, 'n_words': 159}