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

OLDER_GIT_VERSION=$1
NEWEST_GIT_VERSION=$2
MSG=$3
COLOR=$4

cat << EOF > notify.slack.sh
#!/usr/bin/env bash

if [ -z "\${SLACK_CLI_TOKEN}" ]; then
  echo "You need a env var SLACK_CLI_TOKEN with a Slack legacy token"
  echo "Go to https://api.slack.com/custom-integrations/legacy-tokens to create one"
  echo "Create the env variable and rerun this script (\$0)"
  exit 1
fi

slack_txt=\$(git log --oneline $OLDER_GIT_VERSION..$NEWEST_GIT_VERSION | grep -v "Merge pull request" | grep -v "Merge branch" | cut -f 2- -d\  | sed 's/\[#\([0-9]*\)\]/<https:\/\/github.com\/akvo\/akvo-lumen\/issues\/\1|[#\1]>/' | tr \" \')
docker run --rm -e SLACK_CLI_TOKEN 512k/slack-cli \
    chat send \
    --channel='#lumen-dev' \
    --pretext="$MSG. <https://github.com/akvo/akvo-lumen/compare/$OLDER_GIT_VERSION..$NEWEST_GIT_VERSION|Full diff>." \
    --color $COLOR \
    --text "\$slack_txt" > /dev/null
EOF

chmod u+x notify.slack.sh<commit_msg>[#2427] Change slack channel to flumen-dev<commit_after>#!/usr/bin/env bash

OLDER_GIT_VERSION=$1
NEWEST_GIT_VERSION=$2
MSG=$3
COLOR=$4

cat << EOF > notify.slack.sh
#!/usr/bin/env bash

if [ -z "\${SLACK_CLI_TOKEN}" ]; then
  echo "You need a env var SLACK_CLI_TOKEN with a Slack legacy token"
  echo "Go to https://api.slack.com/custom-integrations/legacy-tokens to create one"
  echo "Create the env variable and rerun this script (\$0)"
  exit 1
fi

slack_txt=\$(git log --oneline $OLDER_GIT_VERSION..$NEWEST_GIT_VERSION | grep -v "Merge pull request" | grep -v "Merge branch" | cut -f 2- -d\  | sed 's/\[#\([0-9]*\)\]/<https:\/\/github.com\/akvo\/akvo-lumen\/issues\/\1|[#\1]>/' | tr \" \')
docker run --rm -e SLACK_CLI_TOKEN <PASSWORD>/slack-cli \
    chat send \
    --channel='#flumen-dev' \
    --pretext="$MSG. <https://github.com/akvo/akvo-lumen/compare/$OLDER_GIT_VERSION..$NEWEST_GIT_VERSION|Full diff>." \
    --color $COLOR \
    --text "\$slack_txt" > /dev/null
EOF

chmod u+x notify.slack.sh
{'fraction_non_alphanumeric': 0.18686868686868688, 'fraction_numerical': 0.014646464646464647, 'mean_word_length': 3.2419700214132763, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '1677409', 'n_tokens_mistral': 830, 'n_tokens_neox': 808, 'n_words': 180}