watchfor 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3af4a4c0ee9b7d5b20fc4873a6710d37cc3d4c2d5197ff8a41fc108bc5c1bd38
4
- data.tar.gz: 4ca5dea1cb43c7f1a2afc51c0eaf05048e1f5fd2db6f2545b4ebcc7d822e227b
3
+ metadata.gz: 440bd3cc9c46afea4d4952984e93294db18a02ded76d8a5d5bbaded7d8a927a5
4
+ data.tar.gz: d0798e7395d9471d562ccbe0f299c330603e20cae7141cf68c0e13db4e9acf94
5
5
  SHA512:
6
- metadata.gz: 8ff5740ebc2e684b7aace9f419e0801b6e01d03c1770202a4670361023818c64ae2c43fbdb76787bffc714999411f6be30d7c765daaee73300ce04f1e9573a1e
7
- data.tar.gz: 90f73616551e75ddf5e0093653609cd3375f7445d3bd1880b0159d0981cfd1947051037e908765feaa75bb7a2489cf2352a20cb150666fec3ed7c2727ca8ca0d
6
+ metadata.gz: 6b1a026e89c31b6c2bf93f405655f360bffd2a91692d15f4df0da6dda625b25f54acf3d5d5fe54dfa5f25d53bef9476233b0d222852dcc7901baa2983177f988
7
+ data.tar.gz: '0288f489a53a6029f352dad623296943e3e917bfa0cf93fec0dec6f5262ca122bc62b6b5e8869e359a4994e8639ae9b885d13a944bcfc43abac7cc156e5f9676'
data/README.md CHANGED
@@ -37,6 +37,12 @@ wf.incidents.list(status: "firing")["data"].each { |i| puts i["message"] }
37
37
  # uptime, SLA, reports and the status page (include undoes it)
38
38
  wf.incidents.exclude(19351, reason: "Probe-side DNS hiccup")
39
39
 
40
+ # Post-mortem: creates the draft on first use; only the sections you name change
41
+ wf.incidents.update_postmortem(19351, {
42
+ sections: { summary: "Checkout returned 502 for 14 minutes." },
43
+ add_action_items: [{ title: "Validate upstreams in CI" }]
44
+ })
45
+
40
46
  # Irreversible: wipe a monitor's checks and incidents; uptime restarts "since reset"
41
47
  wf.monitors.reset(mon["id"])
42
48
 
@@ -305,6 +305,13 @@ module Watchfor
305
305
  def mark_maintenance(id, idempotency_key: nil)
306
306
  @c.request("POST", "/incidents/#{id}/mark-maintenance", idempotency_key: idempotency_key)
307
307
  end
308
+ # The incident's post-mortem (404 when it has none yet - #update_postmortem creates it).
309
+ def get_postmortem(id) = @c.request("GET", "/incidents/#{id}/postmortem")
310
+ # Create the post-mortem draft on first use, then apply only what is given:
311
+ # "sections" replaces just the sections named; "add_timeline" and
312
+ # "add_action_items" append (repeats skipped). Publishing and deleting stay
313
+ # in the dashboard.
314
+ def update_postmortem(id, body) = @c.request("PATCH", "/incidents/#{id}/postmortem", body: body)
308
315
  end
309
316
 
310
317
  class StatusPages < Namespace
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Watchfor
4
- VERSION = "0.16.0"
4
+ VERSION = "0.17.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watchfor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - WatchFor