<commit_before>module.exports = function(grunt) {
    var _ = grunt.util._;
    function execCommon(command, args, callback) {
        var jsonCallback = "";
        var child = require('child_process').spawn(command, args);
        child.stdout.on('data', function (data) {
            jsonCallback += data;
        }.bind(this));
        child.on('close', function (code) {
            console.log(jsonCallback);
            callback(JSON.parse(jsonCallback));
        }.bind(this));
        child.on('exit', this.async());
    }

    function upload(username, password, release, assetName){
        _.bind(execCommon, this, 'curl', ['-u', username + ':' + password,
            '-H', 'Accept: application/vnd.github.manifold-preview', '-H', 'Content-Type: application/zip',
            '--data-binary', '@archive.zip',
            'https://uploads.github.com/repos/wix/wix-ui-lib/releases/' + release +'/assets?name=' + assetName + '.zip'])();
    }

    grunt.registerTask('release-create-upload', 'create a new release on github.com', function() {
        var username = grunt.option('username');
        var password = <PASSWORD>('password');
        var tag_name = grunt.option('tag');
        var name = grunt.option('name');
        var body = grunt.option('body');
        if(username && password && tag_name && name && body){
            _.bind(execCommon, this, 'curl', ['-u', username + ':' + password,
                '-d', '{"tag_name":"' + tag_name + '","target_commitish": "master","name": "' + name + '","body":"' + body + '","draft": false,"prerelease": false}',
                'https://api.github.com/repos/wix/wix-ui-lib/releases'], function(data){
                _.bind(upload, this, username, password, data.id, data.name)();
            }.bind(this))();
        } else {
            grunt.warn('Missing require argument(s). Try something like: '+
                'grunt release --username=EMAIL --password=PASSWORD --tag=v1.0.0 --name=v1.0.0 --body=\'Description of the release\'')
        }
    });
};<commit_msg>changing release task to use gitHub access-token instead of username && password which impossible when two-factor authentication is active<commit_after>module.exports = function(grunt) {
    var _ = grunt.util._;
    function execCommon(command, args, callback) {
        var jsonCallback = "";
        var child = require('child_process').spawn(command, args);
        child.stdout.on('data', function (data) {
            jsonCallback += data;
        }.bind(this));
        child.on('close', function (code) {
            console.log(jsonCallback);
            callback(JSON.parse(jsonCallback));
        }.bind(this));
        child.on('exit', this.async());
    }

    function upload(accessToken, release, assetName){
        _.bind(execCommon, this, 'curl', ['-u', accessToken + ':x-oauth-basic',
            '-H', 'Accept: application/vnd.github.manifold-preview', '-H', 'Content-Type: application/zip',
            '--data-binary', '@archive.zip',
            'https://uploads.github.com/repos/wix/wix-ui-lib/releases/' + release +'/assets?name=' + assetName + '.zip'])();
    }

    grunt.registerTask('release-create-upload', 'create a new release on github.com', function() {
        var accessToken = grunt.option('access-token');
        var tag_name = grunt.option('tag');
        var name = grunt.option('name');
        var body = grunt.option('body');
        if(accessToken && tag_name && name && body){
            _.bind(execCommon, this, 'curl', ['-u', accessToken + ':x-oauth-basic',
                '-d', '{"tag_name":"' + tag_name + '","target_commitish": "master","name": "' + name + '","body":"' + body + '","draft": false,"prerelease": false}',
                'https://api.github.com/repos/wix/wix-ui-lib/releases'], function(data){
                _.bind(upload, this, accessToken, data.id, data.name)();
            }.bind(this))();
        } else {
            grunt.warn('Missing require argument(s). Try something like: '+
                'grunt release --access-token --tag=v1.0.0 --name=v1.0.0 --body=\'Description of the release\'')
        }
    });
};
{'fraction_non_alphanumeric': 0.18498789346246974, 'fraction_numerical': 0.0029055690072639223, 'mean_word_length': 2.5489690721649483, 'pattern_counts': {'":': 12, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 4, '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': '460294', 'n_tokens_mistral': 1248, 'n_tokens_neox': 1197, 'n_words': 256}