<commit_before>'use strict';

var Octokit = require('@octokit/rest');
var Moment = require('moment-timezone');
var Promise = require('bluebird');
var _ = require('lodash');

var helper = require('../helper');
var Source = require('./source');


class Github extends Source {
    constructor(options, auth, api) {
        super(options, auth);
        this.type = 'github';

        this.api = api || new Octokit({
            auth() { 
                return auth.getAuth().then(token => { 
                    return token;
                }); 
            }
        });
    }

    generateEntries(auth) {
        var me = this;
        return me.getGitHubUsername()
            .then(function(username) {<commit_msg>Fix octokit import<commit_after>'use strict';

const { Octokit } = require("@octokit/rest");
var Moment = require('moment-timezone');
var Promise = require('bluebird');
var _ = require('lodash');

var helper = require('../helper');
var Source = require('./source');


class Github extends Source {
    constructor(options, auth, api) {
        super(options, auth);
        this.type = 'github';

        this.api = api || new Octokit({
            auth() { 
                return auth.getAuth().then(token => { 
                    return token;
                }); 
            }
        });
    }

    generateEntries(auth) {
        var me = this;
        return me.getGitHubUsername()
            .then(function(username) {
{'fraction_non_alphanumeric': 0.14512785072563925, 'fraction_numerical': 0.0, 'mean_word_length': 2.022964509394572, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7517005', 'n_tokens_mistral': 417, 'n_tokens_neox': 392, 'n_words': 94}