Skip to content

Commit 6f589d6

Browse files
authored
Fix telegram (#109)
1 parent 0be9453 commit 6f589d6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/publish_alpha.yml

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

0 commit comments

Comments
 (0)