<commit_before>if (!process.env.CI) require('dotenv-safe').load()

const fs = require('fs')

const octokit = require('@octokit/rest')()
octokit.authenticate({ type: 'token', token: process.env.ELECTRON_GITHUB_TOKEN })

if (process.argv.length < 6) {
  console.log('Usage: upload-to-github filePath fileName releaseId')
  process.exit(1)
}

const filePath = process.argv[2]
const fileName = process.argv[3]
const releaseId = process.argv[4]
const releaseVersion = process.argv[5]

const getHeaders = (filePath, fileName) => {
  const extension = fileName.split('.').pop()
  const size = fs.statSync(filePath).size
  const options = {
    'json': 'text/json',
    'zip': 'application/zip',
    'txt': 'text/plain'
  }

  return {
    'content-type': options[extension],<commit_msg>chore: fix electron.d.ts file upload (#16335)<commit_after>if (!process.env.CI) require('dotenv-safe').load()

const fs = require('fs')

const octokit = require('@octokit/rest')()
octokit.authenticate({ type: 'token', token: process.env.ELECTRON_GITHUB_TOKEN })

if (process.argv.length < 6) {
  console.log('Usage: upload-to-github filePath fileName releaseId')
  process.exit(1)
}

const filePath = process.argv[2]
const fileName = process.argv[3]
const releaseId = process.argv[4]
const releaseVersion = process.argv[5]

const getHeaders = (filePath, fileName) => {
  const extension = fileName.split('.').pop()
  const size = fs.statSync(filePath).size
  const options = {
    'json': 'text/json',
    'zip': 'application/zip',
    'txt': 'text/plain',
    'ts': 'application/typescript'
  }

  return {
    'content-type': options[extension],
{'fraction_non_alphanumeric': 0.16666666666666666, 'fraction_numerical': 0.010455104551045511, 'mean_word_length': 4.629757785467128, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2236579', 'n_tokens_mistral': 560, 'n_tokens_neox': 556, 'n_words': 118}