From 618136373d4a6f6996e146d20e3d784158b78d11 Mon Sep 17 00:00:00 2001 From: Alex Verkhovsky Date: Wed, 3 Dec 2025 13:29:34 -0700 Subject: [PATCH] fix(discord): suppress link previews with angle brackets --- .github/workflows/discord.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/discord.yaml b/.github/workflows/discord.yaml index ed9cc56e..c15253b7 100644 --- a/.github/workflows/discord.yaml +++ b/.github/workflows/discord.yaml @@ -46,7 +46,7 @@ jobs: [ ${#PR_BODY} -gt $MAX_BODY_LENGTH ] && BODY="${BODY}..." [ -n "$BODY" ] && BODY=" ยท $BODY" - MSG="$ICON **[$LABEL #$PR_NUM: $PR_TITLE]($PR_URL)** by @$PR_USER$BODY" + MSG="$ICON **[$LABEL #$PR_NUM: $PR_TITLE](<$PR_URL>)** by @$PR_USER$BODY" jq -n --arg content "$MSG" '{content: $content}' | curl -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @- # Issue events @@ -72,7 +72,7 @@ jobs: [ ${#ISSUE_BODY} -gt $MAX_BODY_LENGTH ] && BODY="${BODY}..." [ -n "$BODY" ] && BODY=" ยท $BODY" - MSG="$ICON **[$LABEL #$ISSUE_NUM: $ISSUE_TITLE]($ISSUE_URL)** by @$ISSUE_USER$BODY" + MSG="$ICON **[$LABEL #$ISSUE_NUM: $ISSUE_TITLE](<$ISSUE_URL>)** by @$ISSUE_USER$BODY" jq -n --arg content "$MSG" '{content: $content}' | curl -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @- # Issue comment @@ -95,7 +95,7 @@ jobs: BODY=$(echo "$COMMENT_BODY" | tr '\n\r' ' ' | head -c $MAX_BODY_LENGTH) [ ${#COMMENT_BODY} -gt $MAX_BODY_LENGTH ] && BODY="${BODY}..." - MSG="๐Ÿ’ฌ **[Comment on $TYPE #$ISSUE_NUM: $ISSUE_TITLE]($COMMENT_URL)** @$COMMENT_USER: $BODY" + MSG="๐Ÿ’ฌ **[Comment on $TYPE #$ISSUE_NUM: $ISSUE_TITLE](<$COMMENT_URL>)** @$COMMENT_USER: $BODY" jq -n --arg content "$MSG" '{content: $content}' | curl -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @- # PR Review @@ -121,7 +121,7 @@ jobs: [ ${#REVIEW_BODY} -gt $MAX_BODY_LENGTH ] && BODY="${BODY}..." [ -n "$BODY" ] && BODY=": $BODY" - MSG="$ICON **[$LABEL PR #$PR_NUM: $PR_TITLE]($REVIEW_URL)** @$REVIEW_USER$BODY" + MSG="$ICON **[$LABEL PR #$PR_NUM: $PR_TITLE](<$REVIEW_URL>)** @$REVIEW_USER$BODY" jq -n --arg content "$MSG" '{content: $content}' | curl -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @- # PR Review comment @@ -141,7 +141,7 @@ jobs: BODY=$(echo "$COMMENT_BODY" | tr '\n\r' ' ' | head -c $MAX_BODY_LENGTH) [ ${#COMMENT_BODY} -gt $MAX_BODY_LENGTH ] && BODY="${BODY}..." - MSG="๐Ÿ’ญ **[Review Comment PR #$PR_NUM: $PR_TITLE]($COMMENT_URL)** @$COMMENT_USER: $BODY" + MSG="๐Ÿ’ญ **[Review Comment PR #$PR_NUM: $PR_TITLE](<$COMMENT_URL>)** @$COMMENT_USER: $BODY" jq -n --arg content "$MSG" '{content: $content}' | curl -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @- # Release @@ -161,7 +161,7 @@ jobs: [ ${#RELEASE_BODY} -gt $MAX_BODY_LENGTH ] && BODY="${BODY}..." [ -n "$BODY" ] && BODY=" ยท $BODY" - MSG="๐Ÿš€ **[Release $TAG: $NAME]($URL)**$BODY" + MSG="๐Ÿš€ **[Release $TAG: $NAME](<$URL>)**$BODY" jq -n --arg content "$MSG" '{content: $content}' | curl -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @- # Branch/tag created @@ -178,7 +178,7 @@ jobs: REPO_URL: ${{ github.event.repository.html_url }} run: | [ "$REF_TYPE" = "branch" ] && ICON="๐ŸŒฟ" || ICON="๐Ÿท๏ธ" - MSG="$ICON **${REF_TYPE^} created: [$REF]($REPO_URL/tree/$REF)** by @$ACTOR" + MSG="$ICON **${REF_TYPE^} created: [$REF](<$REPO_URL/tree/$REF>)** by @$ACTOR" jq -n --arg content "$MSG" '{content: $content}' | curl -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @- # Branch/tag deleted