<commit_before>'use strict';
const alfy = require('alfy');
const alfredNotifier = require('alfred-notifier');

alfredNotifier();

process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
const host = alfy.config.get('bamboo.host') || 'localhost'
const port = alfy.config.get('bamboo.port') || 8080;
const user = alfy.config.get('bamboo.user') || 'admin';
const password = alfy.config.get('bamboo.password') || '<PASSWORD>';
const auth = new Buffer(`${user}:${password}`).toString('base64')

const options = {
  method: 'GET',
  query: {
    query: alfy.input
  },
  headers: {
    'Authorization': 'Basic ' + auth
  },
  maxAge: 300000
};

alfy.fetch(`${host}:${port}/rest/api/latest/plan?max-result=1000`, options).then(data => {
  const items = data.plans.plan
    .map(x => ({
      title: x.name,
      arg: `${host}:${port}/browse/${x.key}`
    }));<commit_msg>Added filter by input<commit_after>'use strict';
const alfy = require('alfy');
const alfredNotifier = require('alfred-notifier');

alfredNotifier();

process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
const host = alfy.config.get('bamboo.host') || 'localhost'
const port = alfy.config.get('bamboo.port') || 8080;
const user = alfy.config.get('bamboo.user') || 'admin';
const password = alfy.config.get('bamboo.password') || '<PASSWORD>';
const auth = new Buffer(`${user}:${password}`).toString('base64')

const options = {
  method: 'GET',
  query: {
    query: alfy.input
  },
  headers: {
    'Authorization': 'Basic ' + auth
  },
  maxAge: 300000
};

alfy.fetch(`${host}:${port}/rest/api/latest/plan?max-result=1000`, options).then(data => {
  const items = alfy.inputMatches(data.plans.plan, 'name')
    .map(x => ({
      title: x.name,
      arg: `${host}:${port}/browse/${x.key}`
    }));
{'fraction_non_alphanumeric': 0.20697541452258433, 'fraction_numerical': 0.019439679817038306, 'mean_word_length': 4.46875, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '840038', 'n_tokens_mistral': 655, 'n_tokens_neox': 632, 'n_words': 112}