From 67e9a6e3dd330dd41eeed157d8f02a2f601b2cb7 Mon Sep 17 00:00:00 2001 From: Antigravity Date: Thu, 28 May 2026 21:15:17 +0000 Subject: [PATCH] fix(ci): resolve invalid YAML formatting in Telegram notification steps --- .gitea/workflows/ci.yaml | 18 ++++++------------ .github/workflows/ci.yaml | 18 ++++++------------ 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index fc23a15..4bf7da3 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -50,12 +50,10 @@ jobs: TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} run: | if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then + MSG=$(printf "❌ Momento CI Failed\nStep: Lint\nCommit: %s\nBranch: %s" "${{ github.sha }}" "${{ github.ref_name }}") curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ -d "chat_id=${TELEGRAM_CHAT_ID}" \ - -d "text=❌ Momento CI Failed -Step: Lint -Commit: ${{ github.sha }} -Branch: ${{ github.ref_name }}" \ + --data-urlencode "text=${MSG}" \ -d "parse_mode=Markdown" || true fi @@ -69,12 +67,10 @@ Branch: ${{ github.ref_name }}" \ TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} run: | if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then + MSG=$(printf "❌ Momento CI Failed\nStep: Unit Tests\nCommit: %s\nBranch: %s" "${{ github.sha }}" "${{ github.ref_name }}") curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ -d "chat_id=${TELEGRAM_CHAT_ID}" \ - -d "text=❌ Momento CI Failed -Step: Unit Tests -Commit: ${{ github.sha }} -Branch: ${{ github.ref_name }}" \ + --data-urlencode "text=${MSG}" \ -d "parse_mode=Markdown" || true fi @@ -88,12 +84,10 @@ Branch: ${{ github.ref_name }}" \ TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} run: | if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then + MSG=$(printf "❌ Momento CI Failed\nStep: Build\nCommit: %s\nBranch: %s" "${{ github.sha }}" "${{ github.ref_name }}") curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ -d "chat_id=${TELEGRAM_CHAT_ID}" \ - -d "text=❌ Momento CI Failed -Step: Build -Commit: ${{ github.sha }} -Branch: ${{ github.ref_name }}" \ + --data-urlencode "text=${MSG}" \ -d "parse_mode=Markdown" || true fi diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fc23a15..4bf7da3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -50,12 +50,10 @@ jobs: TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} run: | if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then + MSG=$(printf "❌ Momento CI Failed\nStep: Lint\nCommit: %s\nBranch: %s" "${{ github.sha }}" "${{ github.ref_name }}") curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ -d "chat_id=${TELEGRAM_CHAT_ID}" \ - -d "text=❌ Momento CI Failed -Step: Lint -Commit: ${{ github.sha }} -Branch: ${{ github.ref_name }}" \ + --data-urlencode "text=${MSG}" \ -d "parse_mode=Markdown" || true fi @@ -69,12 +67,10 @@ Branch: ${{ github.ref_name }}" \ TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} run: | if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then + MSG=$(printf "❌ Momento CI Failed\nStep: Unit Tests\nCommit: %s\nBranch: %s" "${{ github.sha }}" "${{ github.ref_name }}") curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ -d "chat_id=${TELEGRAM_CHAT_ID}" \ - -d "text=❌ Momento CI Failed -Step: Unit Tests -Commit: ${{ github.sha }} -Branch: ${{ github.ref_name }}" \ + --data-urlencode "text=${MSG}" \ -d "parse_mode=Markdown" || true fi @@ -88,12 +84,10 @@ Branch: ${{ github.ref_name }}" \ TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} run: | if [ -n "$TELEGRAM_BOT_TOKEN" ] && [ -n "$TELEGRAM_CHAT_ID" ]; then + MSG=$(printf "❌ Momento CI Failed\nStep: Build\nCommit: %s\nBranch: %s" "${{ github.sha }}" "${{ github.ref_name }}") curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ -d "chat_id=${TELEGRAM_CHAT_ID}" \ - -d "text=❌ Momento CI Failed -Step: Build -Commit: ${{ github.sha }} -Branch: ${{ github.ref_name }}" \ + --data-urlencode "text=${MSG}" \ -d "parse_mode=Markdown" || true fi