Skip to content

Conversation

@strawgate
Copy link
Contributor

@strawgate strawgate commented Feb 13, 2026

PR Reviews should have a status (approve, request changes, comment), and pr review comments should be done inline and attached to the review.

Closes #15292

Copilot AI review requested due to automatic review settings February 13, 2026 05:33
@strawgate strawgate changed the title Produce friendly PR Reviews with a status and a single review with multiple review comments Produce friendly PR Review Feb 13, 2026
@strawgate strawgate changed the title Produce friendly PR Review Produce friendly PR Reviews Feb 13, 2026
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

Adds a new safe-output tool (submit_pull_request_review) to submit a single consolidated GitHub PR review with an overall decision (APPROVE / REQUEST_CHANGES / COMMENT), and updates the safe-outputs pipeline to buffer inline review comments and submit them together at the end of processing.

Changes:

  • Introduces submit_pull_request_review in agent-output schema, workflow schema, safe-output validation config, and tool manifests.
  • Implements JS buffering + finalization flow so multiple create_pull_request_review_comment messages become one pulls.createReview() submission.
  • Extends Go safe-outputs configuration parsing/generation, tool filtering, and permissions to support the new tool.

Reviewed changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
schemas/agent-output.json Adds new output type schema for submit_pull_request_review.
pkg/workflow/tool_description_enhancer.go Adds constraint messaging for submit_pull_request_review safe-output config.
pkg/workflow/submit_pr_review.go Adds Go config parsing for submit-pull-request-review safe-outputs frontmatter.
pkg/workflow/safe_outputs_tools_test.go Updates tool filtering tests to include submit_pull_request_review.
pkg/workflow/safe_outputs_test.go Updates enabled-tool detection/sorting tests to include the new tool.
pkg/workflow/safe_outputs_config_helpers_reflection.go Maps config field name to tool name for reflection-based helpers.
pkg/workflow/safe_outputs_config_generation.go Emits config and enables the tool when configured.
pkg/workflow/safe_outputs_config.go Extracts submit-pull-request-review from frontmatter into SafeOutputsConfig.
pkg/workflow/safe_output_validation_config_test.go Updates validation config test list to include the new type.
pkg/workflow/safe_output_validation_config.go Adds field validation rules for submit_pull_request_review.
pkg/workflow/js/safe_outputs_tools.json Adds tool definition for submit_pull_request_review to the JS tool list.
pkg/workflow/imports.go Enables import/merge behavior for submit-pull-request-review safe-outputs.
pkg/workflow/compiler_types.go Adds SubmitPullRequestReview to SafeOutputsConfig.
pkg/workflow/compiler_safe_outputs_job.go Expands consolidated safe-outputs job permissions/requirements for PR review submission.
pkg/workflow/compiler_safe_outputs_config.go Adds handler config generation for submit_pull_request_review.
pkg/parser/schemas/main_workflow_schema.json Adds safe-outputs frontmatter schema for submit-pull-request-review.
actions/setup/js/submit_pr_review.test.cjs Adds unit tests for the submit-review handler.
actions/setup/js/submit_pr_review.cjs Implements handler that stores review metadata (body/event) for final submission.
actions/setup/js/safe_outputs_type_validation.test.cjs Updates type/schema/toolname normalization checks to include the new tool.
actions/setup/js/safe_output_unified_handler_manager.cjs Finalizes and submits buffered PR review at end of unified handler processing.
actions/setup/js/safe_output_type_validator.test.cjs Updates sample validation config to include submit_pull_request_review.
actions/setup/js/safe_output_handler_manager.cjs Finalizes and submits buffered PR review at end of handler processing.
actions/setup/js/pr_review_buffer.test.cjs Adds tests for buffering comments and submitting a single PR review.
actions/setup/js/pr_review_buffer.cjs Introduces shared buffer for review comments + metadata + final pulls.createReview() call.
actions/setup/js/create_pr_review_comment.cjs Changes review-comment handling to validate + buffer instead of posting immediately.

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

@pelikhan
Copy link
Contributor

pretty cool. added a few nits about the global state and 'default imports'.

@strawgate
Copy link
Contributor Author

updated PR, testing out here: elastic/ai-github-actions#9 (review)

@strawgate
Copy link
Contributor Author

see elastic/ai-github-actions#9 (review) for pr review, with status and comments :)

@pelikhan
Copy link
Contributor

Very cool.

@pelikhan
Copy link
Contributor

Could you update smoke-copilot to do a submit pull review on the current pr?

@strawgate
Copy link
Contributor Author

done (i think), not sure how to run the smoke tests locally

@pelikhan pelikhan added the smoke label Feb 13, 2026
@pelikhan pelikhan merged commit a30026e into github:main Feb 13, 2026
98 of 100 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Post a single PR Review with a body

2 participants