docs-release-announce — Announce new releases to Slack and/or email
Workflow#
- Verify MCP transport — call
list_workspacesas a connectivity probe. If it fails, print the MCP connection command and exit gracefully. - Validate inputs — confirm that at least one notification channel is selected. Validate that a Slack URL starts with
https://hooks.slack.com/when Slack is selected; validate that an email address is well-formed when email is selected. - Register the release webhook — generate a fresh HMAC secret and register a webhook that fires when a new release is published on the workspace repository. Surface the secret to the user once.
- Generate the handler workflow — produce a GitHub Actions workflow file configured for the selected channels. The workflow triggers on the
release: publishedevent and dispatches notifications using secrets stored in the repository. - Write the workflow file — place it at
.github/workflows/docsbook-release-announce.yml, creating the directory if needed. Overwrite if the file already exists. - Report — print the workflow path, selected channels, and the names of the repository secrets the user must configure.
Guardrails#
- Require at least one channel — Slack or email; reject a call with neither.
- Never hardcode channel credentials in the workflow file — always reference repository secrets.
- If the webhook registration tool is not available on the connected MCP server, fall back to wiring the workflow directly against GitHub's native
release: publishedevent and note the fallback clearly. - Generate a fresh HMAC secret on every run; never reuse a previously shown value.
MCP Tools#
| Tool | Purpose |
|---|---|
list_workspaces |
Probe MCP transport liveness |
register_webhook_content_indexed |
Register a release event webhook on the workspace |
Acceptance Criteria#
- MCP transport verified before any registration
- At least one channel validated before any file is written
- Webhook registered with a freshly generated HMAC secret
- HMAC secret surfaced to the user exactly once
- Workflow file written to
.github/workflows/docsbook-release-announce.yml - Workflow references channel credentials via repository secrets, not inline values
- Output includes workflow path, selected channels, and required secret names