Skip to content

[docs] docs: remove bloat from custom-safe-outputs reference page#20612

Merged
pelikhan merged 1 commit intomainfrom
docs/unbloat-custom-safe-outputs-e768a5d9a11678cc
Mar 12, 2026
Merged

[docs] docs: remove bloat from custom-safe-outputs reference page#20612
pelikhan merged 1 commit intomainfrom
docs/unbloat-custom-safe-outputs-e768a5d9a11678cc

Conversation

@github-actions
Copy link
Contributor

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

🗜️ Compressed by Documentation Unbloat ·

  • expires on Mar 14, 2026, 12:13 AM UTC

- 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>
@github-actions github-actions bot added automation documentation Improvements or additions to documentation labels Mar 12, 2026
@pelikhan pelikhan marked this pull request as ready for review March 12, 2026 00:20
Copilot AI review requested due to automatic review settings March 12, 2026 00:20
@pelikhan pelikhan merged commit 462a084 into main Mar 12, 2026
@pelikhan pelikhan deleted the docs/unbloat-custom-safe-outputs-e768a5d9a11678cc branch March 12, 2026 00:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
}
// 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.
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants