<commit_before>#!/usr/bin/env node
/* eslint-disable no-console */

const fetch = require('node-fetch');
const { execSync } = require('child_process');

const { FRONTPAGE_WEBHOOK, FRONTPAGE_WEBHOOK_NEXT } = process.env;

const branch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim();

const branchToHook = {
  master: FRONTPAGE_WEBHOOK,
  'next': FRONTPAGE_WEBHOOK_NEXT, // <- NOTE: change this to `next` when we merge the new docs
};

console.log('build-frontpage');
const hook = branchToHook[branch];
if (hook) {
  console.log('triggering frontpage build');
  const url = `https://api.netlify.com/build_hooks/${hook}`;
  fetch(url, { method: 'post' }).then((res) => console.log('result', res.status));
} else {
  console.log('skipping branch', branch);
}<commit_msg>Drop unnecessary comment<commit_after>#!/usr/bin/env node
/* eslint-disable no-console */

const fetch = require('node-fetch');
const { execSync } = require('child_process');

const { FRONTPAGE_WEBHOOK, FRONTPAGE_WEBHOOK_NEXT } = process.env;

const branch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim();

const branchToHook = {
  master: FRONTPAGE_WEBHOOK,
  'next': FRONTPAGE_WEBHOOK_NEXT,
};

console.log('build-frontpage');
const hook = branchToHook[branch];
if (hook) {
  console.log('triggering frontpage build');
  const url = `https://api.netlify.com/build_hooks/${hook}`;
  fetch(url, { method: 'post' }).then((res) => console.log('result', res.status));
} else {
  console.log('skipping branch', branch);
}
{'fraction_non_alphanumeric': 0.17348284960422164, 'fraction_numerical': 0.0, 'mean_word_length': 5.191836734693878, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, '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': '7190467', 'n_tokens_mistral': 533, 'n_tokens_neox': 521, 'n_words': 109}