<commit_before>
function github_status {
    gcli status create edx mitx $GIT_COMMIT \
         --params=$1 \
                  target_url:$BUILD_URL \
                  description:"Build #$BUILD_NUMBER is running" \
         -f csv
}

function github_mark_failed_on_exit {
    trap '[ $? == "0" ] || github_status state:failed' EXIT<commit_msg>flexible org repos parsing tested locally<commit_after>##
## requires >= 1.3.0 of the Jenkins git plugin
##

function github_status {

    if [[ ! ${GIT_URL} =~ <EMAIL>:([^/]+)/([^\.]+).git ]]; then
        echo "Cannot parse Github org or repo from URL, using defaults."
        ORG="edx"
        REPO="mitx"
    else
        ORG=${BASH_REMATCH[1]}
        REPO=${BASH_REMATCH[2]}
    fi

    gcli status create $ORG $REPO $GIT_COMMIT \
         --params=$1 \
                  target_url:$BUILD_URL \
                  description:"Build #$BUILD_NUMBER is running" \
         -f csv
}

function github_mark_failed_on_exit {
    trap '[ $? == "0" ] || github_status state:failed' EXIT
{'fraction_non_alphanumeric': 0.13288069835111543, 'fraction_numerical': 0.008729388942774006, 'mean_word_length': 2.286624203821656, 'pattern_counts': {'":': 0, '<': 4, '<?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': '4961495', 'n_tokens_mistral': 351, 'n_tokens_neox': 330, 'n_words': 81}