diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index f894ba0aae..f5f9e32886 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -45,7 +45,7 @@ jobs: fi echo "Commits since $LAST_SHA:" # Accumulate commit logs in a shell variable - COMMIT_LOGS=$(git log $LAST_SHA..HEAD --pretty=format:"● %s ~%an [֍](https://github.com/${{ github.repository }}/commit/%H)" --max-count=20) + COMMIT_LOGS=$(git log $LAST_SHA..HEAD --pretty=format:"● %s ~%an [֍](https://github.com/${{ github.repository }}/commit/%H)" --max-count=10) # Replace commit messages with pull request links COMMIT_LOGS=$(echo "$COMMIT_LOGS" | sed -E 's/#([0-9]+)/[#\1](https:\/\/github.com\/rebelonion\/Dantotsu\/pull\/\1)/g') # URL-encode the newline characters for GitHub Actions @@ -153,14 +153,17 @@ jobs: additional_info["ibo"]="\n Discord: <@951737931159187457>\n AniList: [takarealist112]()" additional_info["aayush262"]="\n Discord: <@918825160654598224>\n AniList: [aayush262]()" additional_info["rebelonion"]="\n Discord: <@714249925248024617>\n AniList: [rebelonion]()\n PornHub: [rebelonion]()" + additional_info["Ankit Grai"]="\n Discord: <@1125628254330560623>\n AniList: [bheshnarayan]()" # Decimal color codes for contributors declare -A contributor_colors - default_color="#ff25f9" + default_color="6121629" + contributor_colors["grayankit"]="#ff9b46" contributor_colors["ibo"]="#ff9b46" contributor_colors["aayush262"]="#5d689d" contributor_colors["Sadwhy"]="#ff7e95" contributor_colors["rebelonion"]="#d4e5ed" + hex_to_decimal() { printf '%d' "0x${1#"#"}"; } # Count recent commits and create an associative array @@ -331,6 +334,17 @@ jobs: done) telegram_commit_messages="
${telegram_commit_messages}
" + # Configuring dev info + echo "$developers" > dev_info.txt + echo "$developers" + # making the file executable + chmod +x workflowscripts/tel_parser.sed + ./workflowscripts/tel_parser.sed dev_info.txt >> output.txt + dev_info_tel=$(< output.txt) + + telegram_dev_info="
${dev_info_tel}
" + echo "$telegram_dev_info" + # Upload APK to Telegram if [ "$SKIP_BUILD" != "true" ]; then APK_PATH="app/build/outputs/apk/google/alpha/app-google-alpha.apk" @@ -345,7 +359,7 @@ jobs: version: ${VERSION}" \ -F "parse_mode=HTML") else - echo "Skipping Telegram message and APK upload due to SKIP_BUILD being set to true" + echo "skipping because skip build set to true" fi env: diff --git a/workflowscripts/tel_parser.sed b/workflowscripts/tel_parser.sed new file mode 100644 index 0000000000..cba1accbb1 --- /dev/null +++ b/workflowscripts/tel_parser.sed @@ -0,0 +1,28 @@ +#!/bin/sed -Ef + +### md-to-html: Sed script that converts Markdown to HTML code + +# s/◗// +/Discord/d +s/%0A/\n/g +s/-/●/ +s/●/●/ + +s/[<>]//g + +s/\[ *([[:alnum:] \&\;\?!,\)\+]*.{0,10}[[:alnum:] \&\;\?!,\)\+]+) *\] *\( *([^ ]+) *\)/\1<\/a>/g + +# **text** and __text__ +s/(^|[^\\\*])\*{2}([^\*]+)\*{2}([^\*]|$)/\1\2\3/g +s/(^|[^\\_])_{2}([^\_]+)_{2}([^_]|$)/\1\2<\/strong>\3/g + +# *text* and _text_ +s/(^|[^\\\*])\*([^\*]+)\*([^\*]|$)/\1\2<\/em>\3/g +s/(^|[^\\_])_([^_]+)_([^_]|$)/\1\2<\/em>\3/g + +# ~~text~~ +s/(^|[^\\~])~~([^~]+)~~([^~]|$)/\1\2<\/del>\3/g +s/(^|[^\\~])~([^~]+)~([^~]|$)/\1\2<\/s>\3/g + +# `text` +s/(^|[^\\`])`([^`]+)`([^`]|$)/\1\2<\/code>\3/g \ No newline at end of file