Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions docs/src/content/docs/reference/footers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
24 changes: 24 additions & 0 deletions docs/src/content/docs/reference/safe-outputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down