<commit_before>'use strict';
var conf = require('../config');
var JiraAPI = require('jira').JiraApi;
var bluebird = require('bluebird');
var jira = new JiraAPI(conf.protocol,
    conf.host,
    conf.port,
    conf.user,
    conf.password,
    conf.apiVersion,
    conf.verbose,
    conf.strictSSL);

module.exports = function(options){
    var filterParam = (options||{}).filterParam || 'filterID';

    return function(req, res, next) {
        bluebird.fromNode(function(callback){
            jira.searchJira('filter=' + req.params[filterParam], ['summary', 'key', 'issuetype'], function(er,data){
                callback(er, data);
            });
        }).then(function(data){
            res.send(data);
        }).error(function (e) {
            res.send('something went wrong - Check the terminal log: ' + e.message);
            next();
        });


    };
};<commit_msg>added config override<commit_after>'use strict';
var conf = require('../config');
var JiraAPI = require('jira').JiraApi;
var bluebird = require('bluebird');
var jira = new JiraAPI(conf.protocol,
    conf.host,
    conf.port,
    conf.user,
    conf.password,
    conf.apiVersion,
    conf.verbose,
    conf.strictSSL);

module.exports = function(options){
    var filterParam = (options||{}).filterParam || 'filterID';

    conf.user = options.user||conf.user;
    conf.password = options.password||<PASSWORD>;
    conf.host = options.host||conf.host;
    conf.port = options.user||conf.port;

    return function(req, res, next) {
        bluebird.fromNode(function(callback){
            jira.searchJira('filter=' + req.params[filterParam], ['summary', 'key', 'issuetype'], function(er,data){
                callback(er, data);
            });
        }).then(function(data){
            res.send(data);
        }).error(function (e) {
            res.send('something went wrong - Check the terminal log: ' + e.message);
            next();
        });


    };
};
{'fraction_non_alphanumeric': 0.16342213114754098, 'fraction_numerical': 0.0, 'mean_word_length': 2.6641651031894935, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '7129144', 'n_tokens_mistral': 594, 'n_tokens_neox': 582, 'n_words': 118}