From 5e2c468eadef4705965367962ed4ad7298aee3e3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 14 Feb 2026 08:19:06 +0000 Subject: [PATCH] docs: Document PR review comment footer control feature Document the new footer field for create-pull-request-review-comment that was added in PR #15643. This feature enables conditional footer display on PR review comments with three modes: always, none, and if-body. Changes: - Add footer field documentation to safe-outputs.md PR review comments section - Add dedicated PR review comment footer control section to footers.md - Include examples and use cases for the if-body mode The if-body mode is particularly useful for clean approval reviews without body text, reducing footer noise while maintaining attribution for reviews with explanatory text. Co-Authored-By: Claude Sonnet 4.5 --- docs/src/content/docs/reference/footers.md | 35 +++++++++++++++++++ .../content/docs/reference/safe-outputs.md | 24 +++++++++++++ 2 files changed, 59 insertions(+) diff --git a/docs/src/content/docs/reference/footers.md b/docs/src/content/docs/reference/footers.md index ae8f0f93c9..ce9026b7d5 100644 --- a/docs/src/content/docs/reference/footers.md +++ b/docs/src/content/docs/reference/footers.md @@ -42,6 +42,41 @@ safe-outputs: Individual handler settings always take precedence over the global setting. +## PR Review Comment Footer Control + +For PR review comments (`create-pull-request-review-comment`), the `footer` field supports additional conditional control: + +```yaml wrap +safe-outputs: + create-pull-request-review-comment: + footer: "if-body" # conditional footer based on review body + submit-pull-request-review: +``` + +The `footer` field accepts three string values: + +- `"always"` (default) - Always include footer on review comments +- `"none"` - Never include footer on review comments +- `"if-body"` - Only include footer when the review has body text + +Boolean values are also supported and automatically converted: +- `true` → `"always"` +- `false` → `"none"` + +This is particularly useful for clean approval reviews without body text. With `footer: "if-body"`, approval reviews appear clean without the AI-generated footer, while reviews with explanatory text still include the footer for attribution. + +**Example use case - Clean approvals:** + +```yaml wrap +safe-outputs: + create-pull-request-review-comment: + footer: "if-body" # Show footer only when review has body + submit-pull-request-review: + max: 1 +``` + +When the agent submits an approval without a body (just "APPROVE" event), no footer appears. When the agent includes explanatory comments in the review body, the footer is included. + ## What's Preserved When Footer is Hidden Even with `footer: false`, the following are still included: diff --git a/docs/src/content/docs/reference/safe-outputs.md b/docs/src/content/docs/reference/safe-outputs.md index 2fa0f91e30..431c507a84 100644 --- a/docs/src/content/docs/reference/safe-outputs.md +++ b/docs/src/content/docs/reference/safe-outputs.md @@ -685,8 +685,32 @@ safe-outputs: side: "RIGHT" # "LEFT" or "RIGHT" (default: "RIGHT") target: "*" # "triggering" (default), "*", or number target-repo: "owner/repo" # cross-repository + footer: "if-body" # footer control: "always", "none", or "if-body" ``` +#### Footer Control for Review Comments + +The `footer` field controls whether AI-generated footers are added to PR review comments: + +- `"always"` (default) - Always include footer on review comments +- `"none"` - Never include footer on review comments +- `"if-body"` - Only include footer when the review has a body text + +You can also use boolean values which are automatically converted: +- `true` → `"always"` +- `false` → `"none"` + +This is particularly useful for clean approval reviews without body text, where you want to avoid footer noise: + +```yaml wrap +safe-outputs: + create-pull-request-review-comment: + footer: "if-body" # Only show footer when review has body text + submit-pull-request-review: +``` + +With `footer: "if-body"`, approval reviews without body text appear clean without the AI-generated footer, while reviews with explanatory text still include the footer for attribution. + ### Submit PR Review (`submit-pull-request-review:`) Submits a consolidated pull request review with a status decision. All `create-pull-request-review-comment` outputs are automatically collected and included as inline comments in the review.