Skip to content

Commit 036e401

Browse files
committed
Update discord.yml
1 parent efa157b commit 036e401

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/discord.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
env:
1414
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
1515
run: |
16+
COMMIT_COUNT=$(echo '${{ toJson(github.event.commits) }}' | jq length)
1617
curl -H "Content-Type: application/json" \
1718
-X POST \
1819
-d "{
@@ -25,7 +26,7 @@ jobs:
2526
\"url\": \"https://github.com/${{ github.actor }}\",
2627
\"icon_url\": \"https://github.com/${{ github.actor }}.png\"
2728
},
28-
\"title\": \"[${{ github.repository }}] ${{ toJson(github.event.commits) }} New Commits!\",
29+
\"title\": \"[${{ github.repository }}] ${COMMIT_COUNT} New Commits!\",
2930
\"description\": \"${{ github.event.head_commit.message }} ${GITHUB_SHA::7} [here](https://github.com/${{ github.repository }}/commit/${{ github.sha }})\",
3031
\"url\": \"https://github.com/${{ github.repository }}/commit/${{ github.sha }}\",
3132
\"color\": 3447003,

0 commit comments

Comments
 (0)