@kana-ai/edgar-ext-uptimerobot 0.1.1 → 0.1.3

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.
package/README.md CHANGED
@@ -45,7 +45,13 @@ last sweep, every `every_seconds`, and files one card per incident in `card_colu
45
45
  | `uptimerobot__incidents` | optional `since` (24 hours ago), `monitor` | `incidents`, `complete` | Each incident has `id`, `monitor_id`, `monitor`, `url`, `kind` (`down` or `degraded`), `reason`, `started_at`, `resolved_at` and `duration_seconds`. Reads at most 5 pages; `complete` is false when more were left. |
46
46
  | `uptimerobot__response_times` | `monitor`, `since`; optional `until` (now) | `threshold_ms`, `min_ms`, `avg_ms`, `max_ms`, `points`, `note` | Five-minute averaged buckets with the monitor's threshold, flat or the lowest per region. |
47
47
 
48
- Both tools read only, and never ask a person.
48
+ `uptimerobot__watch` is the recheck of a `wait` stage, such as the built-in `incident_watch` after a merge. Its input is `since` and `minutes`, the window, and an optional `service`. It answers `done` with `came_back: true` and the incidents at the first incident that started after `since` on a host that `feed.services` maps to that service, or to no service; `done` with `came_back: false` once the window has passed with none; else `skipped`, so the wait goes on. With no `feed` table every incident counts.
49
+
50
+ The tools read only, and never ask a person.
51
+
52
+ ## Watch after a merge
53
+
54
+ The extension adds the workflow `incident_watch`. When a card of severity `critical` or `high` moves to `in_testing`, it finds the card's merged pull request, rechecks `watch` every five minutes for 60 minutes from the merge, and says a quiet hour on the card. An incident of the card's service in that hour opens GitHub's revert of the merge as a new pull request, which a person merges; EDGAR never merges it. The card then moves to `waiting_on_person` and goes to a person. The workflow calls the GitHub extension's tools, so enable `github` too. The [workflow guide](/docs/guides/workflow.md#watch-after-the-merge-and-revert) has each stage.
49
55
 
50
56
  ## Configuration
51
57
 
@@ -2,7 +2,10 @@ import type { CardSpec } from "@kana-ai/edgar-contracts/rpc";
2
2
  import type { ResponseTimes } from "#schemas/uptimerobot";
3
3
  import type { z } from "zod";
4
4
  import type { incidentFacts } from "#schemas/tools";
5
+ import type { Feed } from "#schemas/config";
5
6
  type Facts = z.infer<typeof incidentFacts>;
7
+ /** The project service of the host a monitor checks, as `[extensions.uptimerobot.feed]` maps it; `undefined` with no feed, or a host it maps to none. */
8
+ export declare function serviceOf(url: string | null, feed: Feed | undefined): string | undefined;
6
9
  /** The 16 hex characters of a card's fingerprint. */
7
10
  export declare const fingerprintOf: (identity: string) => string;
8
11
  /** The window a card asks a stage to read other evidence in: 5 minutes before the start to 5 minutes after the end, or 10 minutes after a start still open. */
@@ -1,5 +1,12 @@
1
1
  import { createHash } from "node:crypto";
2
2
  const MINUTE = 60_000;
3
+ /** The project service of the host a monitor checks, as `[extensions.uptimerobot.feed]` maps it; `undefined` with no feed, or a host it maps to none. */
4
+ export function serviceOf(url, feed) {
5
+ if (feed === undefined)
6
+ return undefined;
7
+ const host = url === null ? undefined : new URL(url).host;
8
+ return (host === undefined ? undefined : feed.services[host]) ?? feed.default_service;
9
+ }
3
10
  /** The 16 hex characters of a card's fingerprint. */
4
11
  export const fingerprintOf = (identity) => createHash("sha256").update(identity).digest("hex").slice(0, 16);
5
12
  const clip = (text, most) => text.length > most ? `${text.slice(0, most - 1)}…` : text;
@@ -1,7 +1,7 @@
1
1
  import { setTimeout as sleep } from "node:timers/promises";
2
2
  import { attemptAsync, done, ok, permanentFailure } from "@kana-ai/edgar-sdk";
3
3
  import { factsOf, incidentsSince, isoOf, monitorsById, seriesBetween, thresholdOf, } from "#api/reads";
4
- import { incidentCard, seriesText } from "#feed/cards";
4
+ import { incidentCard, seriesText, serviceOf } from "#feed/cards";
5
5
  import { config } from "#schemas/config";
6
6
  const FIRST_LOOK_MS = 24 * 3_600_000;
7
7
  const MINUTE = 60_000;
@@ -41,10 +41,9 @@ export async function sweep(ctx, feed, from, now = Date.now()) {
41
41
  continue;
42
42
  }
43
43
  const threshold = thresholdOf(known.get(String(f.monitor_id)));
44
- const host = f.url === null ? undefined : new URL(f.url).host;
45
44
  const home = {
46
45
  column: feed.card_column,
47
- service: (host === undefined ? undefined : feed.services[host]) ?? feed.default_service,
46
+ service: serviceOf(f.url, feed),
48
47
  environment: feed.environment,
49
48
  };
50
49
  let series;
@@ -1,3 +1,3 @@
1
- /** The UptimeRobot extension: a service that files incidents as cards, and tools that read incidents and response times. */
1
+ /** The UptimeRobot extension: a service that files incidents as cards, tools that read incidents and response times, and the workflow `incident_watch`, which watches a critical or high card's service after its merge and opens a revert that a person merges. */
2
2
  declare const _default: import("@kana-ai/edgar-sdk").Extension;
3
3
  export default _default;
package/dist/src/index.js CHANGED
@@ -3,7 +3,8 @@ import { HOST, KEY, apiAccess } from "#api/client";
3
3
  import { watch } from "#feed/service";
4
4
  import { config } from "#schemas/config";
5
5
  import { monitorTools } from "#tools/monitors";
6
- /** The UptimeRobot extension: a service that files incidents as cards, and tools that read incidents and response times. */
6
+ import { watchTools } from "#tools/watch";
7
+ /** The UptimeRobot extension: a service that files incidents as cards, tools that read incidents and response times, and the workflow `incident_watch`, which watches a critical or high card's service after its merge and opens a revert that a person merges. */
7
8
  export default defineExtension({
8
9
  name: "uptimerobot",
9
10
  config,
@@ -11,6 +12,7 @@ export default defineExtension({
11
12
  [KEY]: { hosts: [HOST], help: "A read-only UptimeRobot API key (v3)." },
12
13
  },
13
14
  capabilities: apiAccess.capabilities,
14
- tools: monitorTools,
15
+ tools: { ...monitorTools, ...watchTools },
15
16
  service: defineService({ ...apiAccess, run: watch }),
17
+ workflows: ["workflows/incident_watch.toml"],
16
18
  });
@@ -4,28 +4,45 @@ const service = z.string().regex(/^[a-z][a-z0-9_]{0,63}$/);
4
4
  export const config = z.strictObject({
5
5
  feed: z
6
6
  .strictObject({
7
- card_column: z.string().min(1).default("intake"),
7
+ card_column: z
8
+ .string()
9
+ .min(1)
10
+ .default("intake")
11
+ .describe("The tracker column each incident's card is filed in. Default intake."),
8
12
  services: z
9
13
  .record(z.string().min(1), service)
10
14
  .default({})
11
- .describe("the project service of each monitored host, such as example.com"),
15
+ .describe("The project service of each monitored host, such as example.com. None by default."),
12
16
  default_service: service
13
17
  .optional()
14
- .describe("the service of a host that services does not name; none when absent"),
18
+ .describe("The service of a host that services does not name. With none, such a card names no service."),
15
19
  environment: z
16
20
  .string()
17
21
  .min(1)
18
22
  .optional()
19
- .describe("the environment a card names, such as prod"),
23
+ .describe("The environment a card names, such as prod. With none, a card names no environment."),
20
24
  down_after_seconds: z
21
25
  .number()
22
26
  .int()
23
27
  .min(0)
24
28
  .max(86_400)
25
29
  .default(180)
26
- .describe("an outage is filed once it lasts this long; a degraded spell always is"),
27
- every_seconds: z.number().int().min(30).max(86_400).default(300),
28
- max_per_run: z.number().int().min(1).max(100).default(5),
30
+ .describe("How long an outage lasts before it is filed, in seconds. A degraded spell is always filed. Default 180."),
31
+ every_seconds: z
32
+ .number()
33
+ .int()
34
+ .min(30)
35
+ .max(86_400)
36
+ .default(300)
37
+ .describe("How often the service reads new incidents, in seconds. Default 300."),
38
+ max_per_run: z
39
+ .number()
40
+ .int()
41
+ .min(1)
42
+ .max(100)
43
+ .default(5)
44
+ .describe("The most cards one read opens; the rest wait for the next read. Default 5."),
29
45
  })
30
- .optional(),
46
+ .optional()
47
+ .describe("Files each UptimeRobot incident as a card. Without it, the service only waits and the tools still work."),
31
48
  });
@@ -57,3 +57,28 @@ export declare const responseTimesTool: {
57
57
  note: z.ZodString;
58
58
  }, z.core.$strip>;
59
59
  };
60
+ /** The input and output of `watch`, a recheck of a `wait` stage: the incidents of one service that started in a window. */
61
+ export declare const watchTool: {
62
+ input: z.ZodObject<{
63
+ since: z.ZodISODateTime;
64
+ minutes: z.ZodNumber;
65
+ service: z.ZodOptional<z.ZodString>;
66
+ }, z.core.$strip>;
67
+ output: z.ZodObject<{
68
+ came_back: z.ZodBoolean;
69
+ incidents: z.ZodArray<z.ZodObject<{
70
+ id: z.ZodString;
71
+ monitor_id: z.ZodNullable<z.ZodString>;
72
+ monitor: z.ZodNullable<z.ZodString>;
73
+ url: z.ZodNullable<z.ZodString>;
74
+ kind: z.ZodEnum<{
75
+ degraded: "degraded";
76
+ down: "down";
77
+ }>;
78
+ reason: z.ZodNullable<z.ZodString>;
79
+ started_at: z.ZodString;
80
+ resolved_at: z.ZodNullable<z.ZodString>;
81
+ duration_seconds: z.ZodNullable<z.ZodNumber>;
82
+ }, z.core.$strip>>;
83
+ }, z.core.$strip>;
84
+ };
@@ -36,3 +36,19 @@ export const responseTimesTool = {
36
36
  note: z.string(),
37
37
  }),
38
38
  };
39
+ /** The input and output of `watch`, a recheck of a `wait` stage: the incidents of one service that started in a window. */
40
+ export const watchTool = {
41
+ input: z.object({
42
+ since: z.iso.datetime({ offset: true }).describe("the start of the window, such as a merge"),
43
+ minutes: z.number().int().min(1).max(1440).describe("how long the window lasts"),
44
+ service: z
45
+ .string()
46
+ .min(1)
47
+ .optional()
48
+ .describe("the project service; an incident on a host the feed maps to another is left out; every incident counts when absent"),
49
+ }),
50
+ output: z.object({
51
+ came_back: z.boolean().describe("true when an incident started in the window"),
52
+ incidents: z.array(incidentFacts),
53
+ }),
54
+ };
@@ -0,0 +1,30 @@
1
+ import type { z } from "zod";
2
+ import { type Outcome } from "@kana-ai/edgar-sdk";
3
+ import { type UptimeCtx } from "#api/client";
4
+ import { watchTool } from "#schemas/tools";
5
+ type Input = z.infer<typeof watchTool.input>;
6
+ type Output = z.infer<typeof watchTool.output>;
7
+ /** One recheck of the watch at `now`: `done` at the first incident of the service in the window, `done` quiet once the window has passed, else `skipped`, so the wait goes on. An incident on a host the feed maps to no service counts, since nothing says it is another service's. */
8
+ export declare function watched(input: Input, ctx: UptimeCtx, now?: number): Promise<Outcome<Output>>;
9
+ /** The watch after a release: a `wait` stage rechecks it until an incident of the service starts or the window ends. */
10
+ export declare const watchTools: {
11
+ watch: import("@kana-ai/edgar-sdk").Tool<{
12
+ since: string;
13
+ minutes: number;
14
+ service?: string | undefined;
15
+ }, {
16
+ came_back: boolean;
17
+ incidents: {
18
+ id: string;
19
+ monitor_id: string | null;
20
+ monitor: string | null;
21
+ url: string | null;
22
+ kind: "degraded" | "down";
23
+ reason: string | null;
24
+ started_at: string;
25
+ resolved_at: string | null;
26
+ duration_seconds: number | null;
27
+ }[];
28
+ }, "UPTIMEROBOT_API_KEY">;
29
+ };
30
+ export {};
@@ -0,0 +1,37 @@
1
+ import { defineTool, done, skipped } from "@kana-ai/edgar-sdk";
2
+ import { apiAccess } from "#api/client";
3
+ import { factsOf, incidentsSince, monitorsById } from "#api/reads";
4
+ import { serviceOf } from "#feed/cards";
5
+ import { config } from "#schemas/config";
6
+ import { watchTool } from "#schemas/tools";
7
+ /** One recheck of the watch at `now`: `done` at the first incident of the service in the window, `done` quiet once the window has passed, else `skipped`, so the wait goes on. An incident on a host the feed maps to no service counts, since nothing says it is another service's. */
8
+ export async function watched(input, ctx, now = Date.now()) {
9
+ const read = await incidentsSince(ctx, input.since, now);
10
+ if (!read.ok)
11
+ return read.error;
12
+ const known = await monitorsById(ctx, now);
13
+ const byId = known.ok ? known.value : new Map();
14
+ const feed = config.safeParse(ctx.config ?? {}).data?.feed;
15
+ const incidents = read.value.incidents.flatMap((incident) => {
16
+ const facts = factsOf(incident, byId);
17
+ if (facts === undefined)
18
+ return [];
19
+ const service = serviceOf(facts.url, feed);
20
+ const counts = input.service === undefined || service === undefined || service === input.service;
21
+ return counts ? [facts] : [];
22
+ });
23
+ if (incidents.length > 0)
24
+ return done({ came_back: true, incidents });
25
+ const end = Date.parse(input.since) + input.minutes * 60_000;
26
+ return now >= end ? done({ came_back: false, incidents: [] }) : skipped();
27
+ }
28
+ /** The watch after a release: a `wait` stage rechecks it until an incident of the service starts or the window ends. */
29
+ export const watchTools = {
30
+ watch: defineTool({
31
+ description: "For a wait's recheck: done with came_back true at the first UptimeRobot incident of the service that started after `since`, done with came_back false once `minutes` have passed with none, else skipped so the wait goes on",
32
+ input: watchTool.input,
33
+ output: watchTool.output,
34
+ ...apiAccess,
35
+ execute: async (input, ctx) => await watched(input, ctx),
36
+ }),
37
+ };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "contract": 1,
3
3
  "name": "uptimerobot",
4
- "version": "0.1.1",
4
+ "version": "0.1.3",
5
5
  "config_schema": "schemas/config.json",
6
6
  "secrets": [
7
7
  {
@@ -33,10 +33,21 @@
33
33
  "side_effect": false,
34
34
  "approval": "never",
35
35
  "disabled": false
36
+ },
37
+ {
38
+ "name": "watch",
39
+ "description": "For a wait's recheck: done with came_back true at the first UptimeRobot incident of the service that started after `since`, done with came_back false once `minutes` have passed with none, else skipped so the wait goes on",
40
+ "input_schema": "schemas/watch.in.json",
41
+ "output_schema": "schemas/watch.out.json",
42
+ "secrets": ["UPTIMEROBOT_API_KEY"],
43
+ "capabilities": ["network:api.uptimerobot.com"],
44
+ "side_effect": false,
45
+ "approval": "never",
46
+ "disabled": false
36
47
  }
37
48
  ],
38
49
  "webhooks": [],
39
- "workflows": [],
50
+ "workflows": ["workflows/incident_watch.toml"],
40
51
  "roles": [],
41
52
  "skills": [],
42
53
  "tracker": null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kana-ai/edgar-ext-uptimerobot",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "EDGAR extension for UptimeRobot: a service that files an incident as a card, a degraded spell with its response times, and tools that read incidents and response times.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -11,7 +11,8 @@
11
11
  "files": [
12
12
  "dist/src",
13
13
  "edgar-extension.json",
14
- "schemas"
14
+ "schemas",
15
+ "workflows"
15
16
  ],
16
17
  "type": "module",
17
18
  "imports": {
@@ -21,8 +22,8 @@
21
22
  ".": "./dist/src/index.js"
22
23
  },
23
24
  "dependencies": {
24
- "@kana-ai/edgar-contracts": "0.1.1",
25
- "@kana-ai/edgar-sdk": "0.1.1",
25
+ "@kana-ai/edgar-contracts": "0.1.3",
26
+ "@kana-ai/edgar-sdk": "0.1.3",
26
27
  "zod": "4.6.7"
27
28
  },
28
29
  "devDependencies": {
@@ -3,16 +3,18 @@
3
3
  "type": "object",
4
4
  "properties": {
5
5
  "feed": {
6
+ "description": "Files each UptimeRobot incident as a card. Without it, the service only waits and the tools still work.",
6
7
  "type": "object",
7
8
  "properties": {
8
9
  "card_column": {
9
10
  "default": "intake",
11
+ "description": "The tracker column each incident's card is filed in. Default intake.",
10
12
  "type": "string",
11
13
  "minLength": 1
12
14
  },
13
15
  "services": {
14
16
  "default": {},
15
- "description": "the project service of each monitored host, such as example.com",
17
+ "description": "The project service of each monitored host, such as example.com. None by default.",
16
18
  "type": "object",
17
19
  "propertyNames": {
18
20
  "type": "string",
@@ -24,30 +26,32 @@
24
26
  }
25
27
  },
26
28
  "default_service": {
27
- "description": "the service of a host that services does not name; none when absent",
29
+ "description": "The service of a host that services does not name. With none, such a card names no service.",
28
30
  "type": "string",
29
31
  "pattern": "^[a-z][a-z0-9_]{0,63}$"
30
32
  },
31
33
  "environment": {
32
- "description": "the environment a card names, such as prod",
34
+ "description": "The environment a card names, such as prod. With none, a card names no environment.",
33
35
  "type": "string",
34
36
  "minLength": 1
35
37
  },
36
38
  "down_after_seconds": {
37
39
  "default": 180,
38
- "description": "an outage is filed once it lasts this long; a degraded spell always is",
40
+ "description": "How long an outage lasts before it is filed, in seconds. A degraded spell is always filed. Default 180.",
39
41
  "type": "integer",
40
42
  "minimum": 0,
41
43
  "maximum": 86400
42
44
  },
43
45
  "every_seconds": {
44
46
  "default": 300,
47
+ "description": "How often the service reads new incidents, in seconds. Default 300.",
45
48
  "type": "integer",
46
49
  "minimum": 30,
47
50
  "maximum": 86400
48
51
  },
49
52
  "max_per_run": {
50
53
  "default": 5,
54
+ "description": "The most cards one read opens; the rest wait for the next read. Default 5.",
51
55
  "type": "integer",
52
56
  "minimum": 1,
53
57
  "maximum": 100
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "since": {
6
+ "type": "string",
7
+ "format": "date-time",
8
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
9
+ "description": "the start of the window, such as a merge"
10
+ },
11
+ "minutes": {
12
+ "type": "integer",
13
+ "minimum": 1,
14
+ "maximum": 1440,
15
+ "description": "how long the window lasts"
16
+ },
17
+ "service": {
18
+ "description": "the project service; an incident on a host the feed maps to another is left out; every incident counts when absent",
19
+ "type": "string",
20
+ "minLength": 1
21
+ }
22
+ },
23
+ "required": ["since", "minutes"]
24
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "came_back": {
6
+ "type": "boolean",
7
+ "description": "true when an incident started in the window"
8
+ },
9
+ "incidents": {
10
+ "type": "array",
11
+ "items": {
12
+ "type": "object",
13
+ "properties": {
14
+ "id": {
15
+ "type": "string"
16
+ },
17
+ "monitor_id": {
18
+ "type": ["string", "null"]
19
+ },
20
+ "monitor": {
21
+ "type": ["string", "null"]
22
+ },
23
+ "url": {
24
+ "type": ["string", "null"]
25
+ },
26
+ "kind": {
27
+ "type": "string",
28
+ "enum": ["down", "degraded"]
29
+ },
30
+ "reason": {
31
+ "type": ["string", "null"]
32
+ },
33
+ "started_at": {
34
+ "type": "string"
35
+ },
36
+ "resolved_at": {
37
+ "type": ["string", "null"]
38
+ },
39
+ "duration_seconds": {
40
+ "type": ["number", "null"]
41
+ }
42
+ },
43
+ "required": [
44
+ "id",
45
+ "monitor_id",
46
+ "monitor",
47
+ "url",
48
+ "kind",
49
+ "reason",
50
+ "started_at",
51
+ "resolved_at",
52
+ "duration_seconds"
53
+ ]
54
+ }
55
+ }
56
+ },
57
+ "required": ["came_back", "incidents"]
58
+ }
@@ -0,0 +1,52 @@
1
+ # After the fix of a `critical` or `high` card is merged and the card moves to `in_testing`,
2
+ # EDGAR watches the UptimeRobot incidents of the card's service for 60 minutes from the merge,
3
+ # the same window for both severities. A quiet hour is said on the card. An incident in that
4
+ # hour opens GitHub's revert of the merge, which a person merges, and the card goes to a person.
5
+ # The UptimeRobot extension adds this workflow; it calls the GitHub extension's tools.
6
+ version = 1
7
+ trigger = { kind = "card", state = "in_testing" }
8
+
9
+ # A card of any other severity, or none, ends here.
10
+ [stages.merged]
11
+ when = { path = "trigger.card.severity", in = ["critical", "high"] }
12
+ tool = "github__merged_pull_request"
13
+ input = { repo = "trigger.card.service.repo", card = "trigger.card.id" }
14
+
15
+ # One recheck every five minutes. The wait ends when `uptimerobot__watch` sees an incident or the
16
+ # hour passes; its own limit only covers rechecks that could not read UptimeRobot.
17
+ [stages.watch]
18
+ needs = ["merged"]
19
+ when = { path = "stages.merged.output.merged_at", exists = true }
20
+ input = { since = "stages.merged.output.merged_at", minutes = { value = 60 }, service = "trigger.card.service.name" }
21
+ wait = { key = "trigger.card.id", timeout_seconds = 5400, recheck = { tool = "uptimerobot__watch", every_seconds = 300 } }
22
+
23
+ [stages.quiet_note]
24
+ needs = ["watch"]
25
+ when = { path = "stages.watch.output.came_back", equals = false }
26
+ tool = "tracker__comment"
27
+ input = { card = "trigger.card.id", text = { value = "I watched the service's alerts for an hour after the merge, and none came. The card stays in testing for a person to close." }, link = "stages.merged.output.url" }
28
+
29
+ # A revert is a new pull request. EDGAR never merges it, whatever `self_merge` says.
30
+ [stages.revert]
31
+ needs = ["watch"]
32
+ when = { path = "stages.watch.output.came_back", equals = true }
33
+ tool = "github__revert_pull_request"
34
+ input = { url = "stages.merged.output.url" }
35
+
36
+ [stages.revert_note]
37
+ needs = ["revert"]
38
+ when = { path = "stages.revert.output.url", exists = true }
39
+ tool = "tracker__comment"
40
+ input = { card = "trigger.card.id", text = { value = "An alert of the service came within an hour of the merge, so I opened a pull request that reverts it. A person reviews and merges the revert; I do not." }, link = "stages.revert.output.url" }
41
+
42
+ [stages.give_back]
43
+ needs = ["revert_note"]
44
+ when = { path = "stages.revert.output.url", exists = true }
45
+ tool = "tracker__move"
46
+ input = { card = "trigger.card.id", column = { value = "waiting_on_person" } }
47
+
48
+ [stages.hand_back]
49
+ needs = ["give_back"]
50
+ when = { path = "stages.revert.output.url", exists = true }
51
+ tool = "tracker__hand_back"
52
+ input = { card = "trigger.card.id" }