Skip to content

Fix: Move footer control from PR review comments to PR review submission (#15783)#15823

Closed
strawgate wants to merge 1 commit intogithub:mainfrom
strawgate:fix/footer-on-review-submission
Closed

Fix: Move footer control from PR review comments to PR review submission (#15783)#15823
strawgate wants to merge 1 commit intogithub:mainfrom
strawgate:fix/footer-on-review-submission

Conversation

@strawgate
Copy link
Contributor

Summary

  • Moves the footer configuration from create-pull-request-review-comment to submit-pull-request-review, where it logically belongs
  • PR review comments always have a body, so if-body was meaningless there. The review submission body is optional (e.g., simple approvals), making if-body useful
  • Supports string values ("always", "none", "if-body") with backward-compatible boolean support (true"always", false"none")

Changes

  • Go structs: Removed Footer from CreatePullRequestReviewCommentsConfig, added string-based Footer to SubmitPullRequestReviewConfig
  • Compiler: Updated handler config emission to use getEffectiveFooterString helper for proper string/bool resolution
  • JS handlers: Updated both handler managers to read footer from submit_pull_request_review config
  • Schema: Updated main_workflow_schema.json to accept boolean | "always" | "none" | "if-body" on submit-pull-request-review
  • TypeScript: Added SubmitPullRequestReviewConfig interface with footer typing
  • Tests: Renamed and expanded test file with coverage for parsing, handler config emission, and the new helper function
  • Docs: Updated footers reference, safe-outputs specification, and agent documentation

Test plan

  • All footer-specific unit tests pass (parsing string/bool values, handler config emission, getEffectiveFooterString)
  • make build succeeds
  • make fmt and make lint pass
  • CI passes
  • Verify footer: "if-body" on submit-pull-request-review correctly suppresses footer when review body is empty

Fixes #15783

Made with Cursor

Copilot AI review requested due to automatic review settings February 15, 2026 01:07
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

This PR fixes a logical issue where the footer configuration was incorrectly placed on create-pull-request-review-comment instead of submit-pull-request-review. Since PR review comments always require a body, the if-body option was meaningless there. The footer should control the review body in the submission, not the inline comments.

Changes:

  • Moved footer configuration from create-pull-request-review-comment to submit-pull-request-review
  • Enhanced footer support with string values ("always", "none", "if-body") while maintaining backward-compatible boolean support
  • Added comprehensive test coverage for the new footer string handling and helper functions

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/workflow/submit_pr_review.go Added string-based footer field to SubmitPullRequestReviewConfig with parsing logic for both string and boolean values
pkg/workflow/create_pr_review_comment.go Removed footer field and parsing logic from CreatePullRequestReviewCommentsConfig
pkg/workflow/compiler_safe_outputs_config.go Added getEffectiveFooterString helper and updated handler config emission for submit_pull_request_review
pkg/workflow/submit_pr_review_footer_test.go Renamed and expanded test file with comprehensive coverage for footer parsing, handler config, and helper function
actions/setup/js/safe_output_unified_handler_manager.cjs Updated to read footer config from submit_pull_request_review instead of create_pull_request_review_comment
actions/setup/js/safe_output_handler_manager.cjs Updated to read footer config from submit_pull_request_review instead of create_pull_request_review_comment
actions/setup/js/pr_review_buffer.cjs Updated comments to reflect footer configuration source change
actions/setup/js/types/safe-outputs-config.d.ts Added SubmitPullRequestReviewConfig interface with footer field typing
pkg/parser/schemas/main_workflow_schema.json Updated schema to accept boolean or string enum for footer on submit-pull-request-review
docs/src/content/docs/reference/footers.md Updated documentation to show footer on submit-pull-request-review with examples
docs/src/content/docs/reference/safe-outputs-specification.md Added note about footer control on submit-pull-request-review
.github/aw/github-agentic-workflows.md Updated agent documentation with correct footer location and examples

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

✅ Smoke Test - Run 22027385232

PR: #15823 (Fix: Move footer control from PR review comments to PR review submission)
Author: @strawgate

Tests: ✅ GitHub MCP | ✅ Safe Inputs | ❌ Serena (N/A) | ✅ Playwright | ✅ File I/O | ✅ Build
Status: PASS

Full results in issue

AI generated by Smoke Copilot

@strawgate strawgate closed this Feb 15, 2026
@strawgate
Copy link
Contributor Author

cursor got a little pr trigger happy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Footer control should be on PR Review Submission not on comments

1 participant