[docs] docs: remove bloat from custom-safe-outputs reference page#20612
[docs] docs: remove bloat from custom-safe-outputs reference page#20612
Conversation
- Merge "When to Use" section into the intro paragraph (was redundant) - Remove Step 1 (Define the MCP Server) as it's entirely contained within the Step 2 example; combine into a single setup step - Remove duplicate JavaScript "Accessing Agent Output" example; the Bash example and the Notion walkthrough already cover this pattern - Condense "Understanding inputs:" from a verbose subsection to a single explanatory sentence - Condense "Staged Mode Support" to a brief note with a link to the Staged Mode reference page Reduces file from 451 to 373 lines (~17% reduction in lines, ~25% reduction in prose word count). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Removes duplicated/verbose content from the Custom Safe Outputs reference while keeping the core guidance and examples intact.
Changes:
- Consolidates the “when to use” guidance into a shorter intro.
- Merges the MCP server + custom job setup into a single “shared configuration” step and renumbers subsequent steps.
- Removes redundant examples/sections (JS output-processing example, expanded
inputs:explanation, and inline staged-mode code) in favor of shorter explanations and a link to the staged-mode reference.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| - Update databases or external storage | ||
| - Call custom APIs that require authentication | ||
| - Perform any write operation that built-in safe outputs don't cover | ||
| Custom safe outputs extend built-in GitHub operations to integrate with third-party services — Slack, Discord, Notion, Jira, databases, or any external API requiring authentication. Use them for any write operation that built-in safe outputs don't cover. |
There was a problem hiding this comment.
The updated intro sentence is a bit misleading: custom safe outputs don’t really “extend built-in GitHub operations” so much as extend GitHub Agentic Workflows / built-in safe outputs to support third‑party write operations. Consider rephrasing to reference “built-in safe outputs” (issues/PRs/discussions) to avoid implying this is a GitHub-native feature set being extended.
| Custom safe outputs extend built-in GitHub operations to integrate with third-party services — Slack, Discord, Notion, Jira, databases, or any external API requiring authentication. Use them for any write operation that built-in safe outputs don't cover. | |
| Custom safe outputs extend GitHub Agentic Workflows' built-in safe outputs (issues, pull requests, discussions) to support third-party services — Slack, Discord, Notion, Jira, databases, or any external API requiring authentication. Use them for any write operation that built-in safe outputs don't cover. |
| } | ||
| // Actually send the notification | ||
| ``` | ||
| When `GH_AW_SAFE_OUTPUTS_STAGED === 'true'`, skip the real operation and display a preview using `core.summary`. See [Staged Mode](/gh-aw/reference/staged-mode/#staged-mode-for-custom-safe-output-jobs) for a complete example. |
There was a problem hiding this comment.
This reads like the environment variable’s value literally includes a JavaScript comparison (=== 'true'). For language-agnostic docs, it’s clearer/accurate to say something like “When GH_AW_SAFE_OUTPUTS_STAGED is set to 'true'…” (the comparison operator is part of your code, not the variable).
| When `GH_AW_SAFE_OUTPUTS_STAGED === 'true'`, skip the real operation and display a preview using `core.summary`. See [Staged Mode](/gh-aw/reference/staged-mode/#staged-mode-for-custom-safe-output-jobs) for a complete example. | |
| When `GH_AW_SAFE_OUTPUTS_STAGED` is set to `'true'`, skip the real operation and display a preview using `core.summary`. See [Staged Mode](/gh-aw/reference/staged-mode/#staged-mode-for-custom-safe-output-jobs) for a complete example. |
Removes documentation bloat from
docs/src/content/docs/reference/custom-safe-outputs.md, reducing the file from 451 to 373 lines (~17% line reduction, ~25% prose word count reduction) while preserving all essential information.Changes Made
1. Merged "When to Use" section into intro (−11 lines)
The 5-bullet "When to Use Custom Safe Outputs" section was redundant with the intro paragraph — both listed the same services and use cases. Consolidated to a single concise sentence.
2. Removed Step 1 "Define the MCP Server" (−23 lines)
Step 1 showed a standalone MCP server config block that was then repeated verbatim at the start of Step 2's full example. Since Step 2 already contained the complete setup, Step 1 was pure duplication. The two setup steps are now merged into one combined "Define the Shared Configuration" step.
3. Removed duplicate JavaScript "Accessing Agent Output" example (−30 lines)
The "Accessing Agent Output" section contained both a Bash and a JavaScript example. The JavaScript example (30 lines) duplicated the pattern already shown in the full Notion walkthrough example. Kept the Bash example and replaced the JavaScript section with a single explanatory sentence.
4. Condensed "Understanding
inputs:" section (−7 lines)The 8-line subsection explained that
inputs:has two purposes (tool discovery + validation). This is captured in a single sentence appended to the Accessing Agent Output section.5. Condensed "Staged Mode Support" (−8 lines)
Replaced an inline code example with a 1-line note linking to the Staged Mode reference page, which already has the complete example.
Screenshots
Screenshots could not be captured due to network isolation between the Playwright browser sandbox and the local preview server in this CI environment. The documentation page renders correctly when accessed via HTTP (verified with curl).
Blocked domains: None encountered (the issue was network isolation, not blocked external resources).
References: §22980144235