Skip to content

Commit 05d76cc

Browse files
authored
Update discord-notify.yml
1 parent 29ebfe2 commit 05d76cc

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

.github/workflows/discord-notify.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
--arg short "$short" \
4949
--arg curlink "$url" \
5050
--arg iso "$(date -u -d "${ts:-$(date -Iseconds)}" +'%Y-%m-%dT%H:%M:%SZ')" \
51+
--arg epoch "$(date -d "${ts:-$(date -Iseconds)}" +%s)" \
5152
'{
5253
username: "GitHub",
5354
avatar_url: "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png",
@@ -60,15 +61,9 @@ jobs:
6061
url: ("https://github.com/" + $login),
6162
icon_url: ("https://avatars.githubusercontent.com/" + $login)
6263
},
63-
description: $msg,
64-
footer: { text: "\u200B" }, # keep timestamp, no visible text
64+
description: ($msg + "\n\n_" + "[`" + $short + "`](" + $curlink + ") • <t:" + $epoch + ":f>_"),
6565
timestamp: $iso
66-
}],
67-
components: [
68-
{ "type": 1, "components": [
69-
{ "type": 2, "style": 5, "label": $short, "url": $curlink } # clickable SHA
70-
]}
71-
]
66+
}]
7267
}' \
7368
| curl -fsS -H 'Content-Type: application/json' -d @- "$WEBHOOK" >/dev/null
7469
done

0 commit comments

Comments
 (0)