Fix: Move footer control from PR review comments to PR review submission (#15783)#15823
Fix: Move footer control from PR review comments to PR review submission (#15783)#15823strawgate wants to merge 1 commit intogithub:mainfrom
Conversation
There was a problem hiding this comment.
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
footerconfiguration fromcreate-pull-request-review-commenttosubmit-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.
✅ Smoke Test - Run 22027385232PR: #15823 (Fix: Move footer control from PR review comments to PR review submission) Tests: ✅ GitHub MCP | ✅ Safe Inputs | ❌ Serena (N/A) | ✅ Playwright | ✅ File I/O | ✅ Build
|
|
cursor got a little pr trigger happy |
Summary
footerconfiguration fromcreate-pull-request-review-commenttosubmit-pull-request-review, where it logically belongsif-bodywas meaningless there. The review submission body is optional (e.g., simple approvals), makingif-bodyuseful"always","none","if-body") with backward-compatible boolean support (true→"always",false→"none")Changes
FooterfromCreatePullRequestReviewCommentsConfig, added string-basedFootertoSubmitPullRequestReviewConfiggetEffectiveFooterStringhelper for proper string/bool resolutionsubmit_pull_request_reviewconfigmain_workflow_schema.jsonto acceptboolean | "always" | "none" | "if-body"onsubmit-pull-request-reviewSubmitPullRequestReviewConfiginterface with footer typingTest plan
getEffectiveFooterString)make buildsucceedsmake fmtandmake lintpassfooter: "if-body"onsubmit-pull-request-reviewcorrectly suppresses footer when review body is emptyFixes #15783
Made with Cursor