[feature] Automatically ping for changelogs

Signed-off-by: Dominika <sokolov.dominika@gmail.com>
This commit is contained in:
Dominika 2020-12-03 19:44:54 -05:00
parent dd673b0058
commit 1b3bf6fc2d
No known key found for this signature in database
GPG Key ID: B4A5A6DCA70F861F
1 changed files with 9 additions and 0 deletions

View File

@ -50,5 +50,14 @@ JAR_NAME="$("$_d"/scripts/buildNamed.sh)" || exit $?
REPO="$KAMI_REPO_NIGHTLY"
[ "$1" == "major" ] && REPO="$KAMI_REPO_MAJOR"
# Send ping
if [ -n "$KAMI_UPDATES_ROLE_ID" ]; then
curl -X POST \
-H "Content-Type: application/json" \
-d '{"username": "", "content": "<@&'"$KAMI_UPDATES_ROLE_ID"'>"}' \
"$KAMI_WEBHOOK"
fi
# Send changelog embed
curl -H "Content-Type: application/json" -X POST \
-d '{"embeds": [{"title": "Download v'"$VERSION"'","color": 10195199,"description": "[**DOWNLOAD**](https://github.com/'"$KAMI_OWNER"'/'"$REPO"'/releases/download/'"$VERSION"'/'"$JAR_NAME"')\n\n**Changelog:** \n'"$CHANGELOG"'\n\nDiff: ['"$OLD_COMMIT"'...'"$HEAD"'](https://github.com/'"$KAMI_OWNER"'/'"$REPO"'/compare/'"$OLD_COMMIT"'...'"$HEAD"') "}]}' "$KAMI_WEBHOOK"