Skip to content

Commit 2e9f6e6

Browse files
Fix. Telegram msg (#122)
* Fix. Telegram msg * Update publish_alpha.yml --------- Co-authored-by: Itsmechinmoy <[email protected]>
1 parent 31cdc7a commit 2e9f6e6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/publish_alpha.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,12 @@ jobs:
272272
else
273273
echo "Skipping APK upload to Discord due to SKIP_BUILD being set to true"
274274
fi
275-
276-
telegram_commit_messages=$(echo "$COMMIT_LOG" | sed 's/%0A/\n/g' | while read -r line; do
275+
COMMIT_LOG=$(cat commit_log.txt)
276+
if [ ${#COMMIT_LOG} -gt 1024 ]; then
277+
COMMIT_LOG="${COMMIT_LOG:0:900}"
278+
fi
279+
TRUNCATED_COMMIT_LOG="$COMMIT_LOG"
280+
telegram_commit_messages=$(echo "$TRUNCATED_COMMIT_LOG" | sed 's/%0A/\n/g' | while read -r line; do
277281
message=$(echo "$line" | sed -E 's/● (.*) ~(.*) \[֍\]\((.*)\)/● \1 ~\2 <a href="\3">֍<\/a>/')
278282
message=$(echo "$message" | sed -E 's/\[#([0-9]+)\]\((https:\/\/github\.com\/[^)]+)\)/<a href="\2">#\1<\/a>/g')
279283
echo "$message"

0 commit comments

Comments
 (0)