Skip to content

Commit 77d2af1

Browse files
fix bug like garbage
1 parent 1aee2cd commit 77d2af1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/warn_direct_push.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,20 @@ jobs:
2323
echo " help: This is not recommended."
2424
echo " help: Please revert those commit github."
2525
# TODO: checkout branch and revert default branch to base.
26-
PUSHER_DISCORD="$(echo '***' | jq '[.[] | ({ key: .github[], value: .discord })] | from_entries"' | jq -r ".$PUSHER_GITHUB")"
26+
PUSHER_DISCORD="$(echo '***' | jq '[.[] | ({ key: .github[], value: .discord })] | from_entries' | jq -r ".$PUSHER_GITHUB")"
2727
PUSHER_DISCORD_MENTION=""
2828
if [ "$PUSHER_DISCORD" == "null" ]; then
2929
echo "warn: pusher's Discord numeric id could not found."
3030
echo " help: To solve this warning, please register $PUSHER_GITHUB explicitly."
3131
else
3232
PUSHER_DISCORD_MENTION="<@${PUSHER_DISCORD}>"
3333
fi
34-
34+
3535
jq -n \
3636
--arg discord_user_mention "<@1>" \
3737
--arg iso8601_timestamp "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
3838
--arg github_repository https://github.com/KisaragiEffective/git-playground \
3939
'{"content":$discord_user_mention,"embeds":[{"title":"Direct push deteceted","description":"Direct push is not recommended. Please consider revert it and open equivalent Pull request.","url":$github_repository,"timestamp":$iso8601_timestamp,"color":16711680,"author":{"name":"GitHub Actions","url":"https://github.com/"}}]}' | \
4040
curl -d@- '***'
4141
42+

0 commit comments

Comments
 (0)