<commit_before>#!/usr/bin/env zsh

function jql() {
  curl "https://$JIRA_TEAM.atlassian.net/rest/api/2/search?jql=$1&maxResults=100&startAt=$(($2 * 100))" \
    -s -u "$JIRA_USER:$JIRA_TOKEN" \
    |  jq -r '.issues[] | "\(.key): \(.fields.summary)"'
}

function fjql() {
  set -e

  ticket=$({for ((req=0;req<5;req++)); do
    jql $1 $req &
  done} | fzf --no-hscroll +m | cut -d ':' -f 1)

  [ ${#ticket} -gt 0 ] && open "https://$JIRA_TEAM.atlassian.net/browse/$ticket"
}

alias fj="fjql 'order%20by%20updated%20DESC'"
alias fjm="fjql 'assignee%20%3D%20currentUser()%20AND%20resolution%20%3D%20Unresolved%20order%20by%20updated%20DESC'"<commit_msg>Adjust jjql to not kill parent shell on SIGINT.<commit_after>#!/usr/bin/env zsh

function jql() {
  curl "https://$JIRA_TEAM.atlassian.net/rest/api/2/search?jql=$1&maxResults=100&startAt=$(($2 * 100))" \
    -s -u "$JIRA_USER:$JIRA_TOKEN" \
    |  jq -r '.issues[] | "\(.key): \(.fields.summary)"'
}

function fjql() {
  ticket=$({for ((req=0;req<5;req++)); do
    jql $1 $req &
  done} | fzf --no-hscroll +m | cut -d ':' -f 1)

  [ ${#ticket} -gt 0 ] && open "https://$JIRA_TEAM.atlassian.net/browse/$ticket"
}

alias fj="fjql 'order%20by%20updated%20DESC'"
alias fjm="fjql 'assignee%20%3D%20currentUser()%20AND%20resolution%20%3D%20Unresolved%20order%20by%20updated%20DESC'"
{'fraction_non_alphanumeric': 0.22590361445783133, 'fraction_numerical': 0.06325301204819277, 'mean_word_length': 4.358870967741935, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4761924', 'n_tokens_mistral': 648, 'n_tokens_neox': 586, 'n_words': 93}