<commit_before>'use strict';

var parse = require('parse-github-url');

/**
 * Called in the `init` transform. Adds a `github`
 * property to the context.
 *
 * @param  {Object} `verb`
 */

module.exports = function github_(verb) {
  var repo = verb.env.repository;
  var url = (repo && typeof repo === 'object')
    ? repo.url
    : repo;

  var github = parse(url);
  if (github && Object.keys(github).length) {
    verb.data({github: github});
  }
};
<commit_msg>get `repository` property from `verb.cache.data`<commit_after>'use strict';

var parse = require('parse-github-url');

/**
 * Called in the `init` transform. Adds a `github`
 * property to the context.
 *
 * @param  {Object} `verb`
 */

module.exports = function github_(verb) {
  var repo = verb.get('data.repository');
  var url = (repo && typeof repo === 'object')
    ? repo.url
    : repo;

  var github = parse(url);
  if (github && Object.keys(github).length) {
    verb.data({github: github});
  }
};

{'fraction_non_alphanumeric': 0.17435897435897435, 'fraction_numerical': 0.0, 'mean_word_length': 3.416289592760181, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1180803', 'n_tokens_mistral': 331, 'n_tokens_neox': 320, 'n_words': 88}