lib/bot.ts

import { requestApproval } from "chat/workflow";import type { Thread } from "chat"; export async function deployApproval(opts: { thread: Thread; version: string }) { "use workflow"; const { approved, user, timedOut } = await requestApproval(opts.thread, { title: `Deploy Website?`, fields: { Version: opts.version }, timeout: "24h", }); if (approved) { await deploy(opts.version); }}
Send a card to request approval for a deployment