feat(scripts): add detect-url-changes change-detection step
Co-authored-by: Nasyarobby Putra <nasyarobby@gmail.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
name: detect example.com changes
|
||||
description: |
|
||||
Fetch example.com, fingerprint the response, and report whether it changed
|
||||
since the previous run. Uses detect-url-changes with a transform that builds
|
||||
a human-readable message into ctx.data.message.
|
||||
scripts:
|
||||
- script: detect-url-changes.js
|
||||
config:
|
||||
url: https://example.com/
|
||||
outputVar: message
|
||||
transform: >
|
||||
data.hasChanges
|
||||
? "example.com changed (fingerprint " & data.fingerprint & ")"
|
||||
: "example.com unchanged since " & data.fingerprintAt
|
||||
triggers:
|
||||
- type: HTTP
|
||||
method: POST
|
||||
path: /detect-example
|
||||
Reference in New Issue
Block a user