<commit_before>import _ from 'lodash';

export function findProjectKey(jiraClient) {
  return jiraClient.listProjects()
    .then(projects => _.find(projects,
      project => project.name === jiraClient.projectName));
}

export function getEpicLinkField(jiraClient) {
  return jiraClient.listFields()
    .then(fields => {
      for(let i = 0; i < fields.length; i++) {
        if(fields[i].name === 'Epic Link') {
          return fields[i].id;
        }
      }

      return Promise.reject('Cannot find Epic Link Field.');
    });
}

function findIssueLinkParentKey(issue, linkDirection) {
  let index = _.findIndex(issue.fields.issuelinks,
    issueLink => issueLink[linkDirection].fields.issuetype.name === 'Initiative');<commit_msg>Fix broken test<commit_after>import _ from 'lodash';

export function findProjectKey(jiraClient) {
  return jiraClient.listProjects()
    .then(projects => _.find(projects,
        project => project.name === jiraClient.projectName).key);
}

export function getEpicLinkField(jiraClient) {
  return jiraClient.listFields()
    .then(fields => {
      for(let i = 0; i < fields.length; i++) {
        if(fields[i].name === 'Epic Link') {
          return fields[i].id;
        }
      }

      return Promise.reject('Cannot find Epic Link Field.');
    });
}

function findIssueLinkParentKey(issue, linkDirection) {
  let index = _.findIndex(issue.fields.issuelinks,
    issueLink => issueLink[linkDirection].fields.issuetype.name === 'Initiative');
{'fraction_non_alphanumeric': 0.13930013458950202, 'fraction_numerical': 0.0013458950201884253, 'mean_word_length': 3.561349693251534, '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': '5683732', 'n_tokens_mistral': 463, 'n_tokens_neox': 452, 'n_words': 91}