Skip to content

Commit

Permalink
✨ Add support for Action secrets everywhere (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
KaKi87 authored Dec 17, 2023
1 parent ad82cd5 commit 0a20883
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,22 +277,22 @@ export const update = async (shouldCommit = false) => {
: "down";
if (parseInt(responseTime) > (site.maxResponseTime || 60000)) status = "degraded";
if (status === "up" && typeof result.data === "string") {
if (site.__dangerous__body_down && result.data.includes(site.__dangerous__body_down))
if (site.__dangerous__body_down && result.data.includes(replaceEnvironmentVariables(site.__dangerous__body_down)))
status = "down";
if (
site.__dangerous__body_degraded &&
result.data.includes(site.__dangerous__body_degraded)
result.data.includes(replaceEnvironmentVariables(site.__dangerous__body_degraded))
)
status = "degraded";
}
if (
site.__dangerous__body_degraded_if_text_missing &&
!result.data.includes(site.__dangerous__body_degraded_if_text_missing)
!result.data.includes(replaceEnvironmentVariables(site.__dangerous__body_degraded_if_text_missing))
)
status = "degraded";
if (
site.__dangerous__body_down_if_text_missing &&
!result.data.includes(site.__dangerous__body_down_if_text_missing)
!result.data.includes(replaceEnvironmentVariables(site.__dangerous__body_down_if_text_missing))
)
status = "down";
return { result, responseTime, status };
Expand Down

0 comments on commit 0a20883

Please sign in to comment.