<commit_before>import axios from 'axios';

const ignoredStories = ['151262175', '148077489'];

function url(storyNumber) {
  return `https://www.pivotaltracker.com/services/v5/projects/1126018/stories/${storyNumber}`;
}

const privates = new WeakMap();

export default class TrackerHelper {
  constructor(trackerToken) {
    privates.set(this, {trackerToken});
  }

  async getStories(storyNumbers) {
    const {trackerToken} = privates.get(this);
    const stories = {};
    await Promise.all(storyNumbers
      .filter(storyNumber => ignoredStories.indexOf(storyNumber) === -1)
      .map(storyNumber =>
        axios.get(url(storyNumber), {headers: {'X-TrackerToken': trackerToken}})
          .then(({data, data: {id}}) => stories[id] = data)
          .catch(console.error)));
    return stories;
  }
};<commit_msg>Ignore story 151620080 in changelog<commit_after>import axios from 'axios';

const ignoredStories = ['151262175', '148077489', '151620080'];

function url(storyNumber) {
  return `https://www.pivotaltracker.com/services/v5/projects/1126018/stories/${storyNumber}`;
}

const privates = new WeakMap();

export default class TrackerHelper {
  constructor(trackerToken) {
    privates.set(this, {trackerToken});
  }

  async getStories(storyNumbers) {
    const {trackerToken} = privates.get(this);
    const stories = {};
    await Promise.all(storyNumbers
      .filter(storyNumber => ignoredStories.indexOf(storyNumber) === -1)
      .map(storyNumber =>
        axios.get(url(storyNumber), {headers: {'X-TrackerToken': trackerToken}})
          .then(({data, data: {id}}) => stories[id] = data)
          .catch(console.error)));
    return stories;
  }
};
{'fraction_non_alphanumeric': 0.15223880597014924, 'fraction_numerical': 0.04298507462686567, 'mean_word_length': 4.078787878787879, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '4309795', 'n_tokens_mistral': 585, 'n_tokens_neox': 541, 'n_words': 101}