Skip to content

Commit

Permalink
♻️ Use config prefix instead of emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Nov 22, 2020
1 parent 04d39fb commit 83c286c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,16 @@ generator: Upptime <https://github.com/upptime/upptime>
commit(
(
(config.commitMessages || {}).statusChange ||
"$EMOJI $SITE_NAME is $STATUS ($RESPONSE_CODE in $RESPONSE_TIME ms) [skip ci] [upptime]"
"$PREFIX $SITE_NAME is $STATUS ($RESPONSE_CODE in $RESPONSE_TIME ms) [skip ci] [upptime]"
)
.replace("$EMOJI", status === "up" ? "🟩" : status === "degraded" ? "🟨" : "🟥")
.replace(
"$PREFIX",
status === "up"
? config.commitPrefixStatusUp || "🟩"
: status === "degraded"
? config.commitPrefixStatusDegraded || "🟨"
: config.commitPrefixStatusDown || "🟥"
)
.replace("$SITE_NAME", site.name)
.replace("$SITE_URL", site.url)
.replace("$SITE_METHOD", site.method || "GET")
Expand Down

0 comments on commit 83c286c

Please sign in to comment.