Skip to content

Add SafeOutput for reply to PR Review Comment#15691

Merged
pelikhan merged 16 commits intogithub:mainfrom
strawgate:reply-to-pull-request-review-comment
Feb 14, 2026
Merged

Add SafeOutput for reply to PR Review Comment#15691
pelikhan merged 16 commits intogithub:mainfrom
strawgate:reply-to-pull-request-review-comment

Conversation

@strawgate
Copy link
Contributor

Closes #15576

…-review-comment

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	actions/setup/js/safe_output_handler_manager.cjs
#	actions/setup/js/safe_output_unified_handler_manager.cjs
#	actions/setup/js/safe_outputs_tools.json
#	actions/setup/js/types/safe-outputs-config.d.ts
#	docs/src/content/docs/reference/frontmatter-full.md
#	docs/src/content/docs/reference/safe-outputs.md
#	pkg/parser/schemas/main_workflow_schema.json
#	pkg/workflow/compiler_safe_outputs_config.go
#	pkg/workflow/compiler_safe_outputs_job.go
#	pkg/workflow/compiler_types.go
#	pkg/workflow/imports.go
#	pkg/workflow/js/safe_outputs_tools.json
#	pkg/workflow/safe_output_validation_config.go
#	pkg/workflow/safe_outputs_config.go
#	pkg/workflow/safe_outputs_config_generation.go
#	pkg/workflow/safe_outputs_config_helpers_reflection.go
#	pkg/workflow/safe_outputs_permissions.go
#	pkg/workflow/safe_outputs_tools_test.go
#	pkg/workflow/tool_description_enhancer.go
#	schemas/agent-output.json
Copilot AI review requested due to automatic review settings February 14, 2026 14:40
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 adds SafeOutput support for replying to existing pull request review comments, enabling agents to respond to reviewer feedback through standard GitHub PR comment mechanisms. The implementation follows established patterns in the codebase and includes comprehensive test coverage.

Changes:

  • Adds reply-to-pull-request-review-comment safe output type with configuration for max replies, target PR, cross-repository support, and optional footer control
  • Implements JavaScript handler using GitHub's REST API createReplyForReviewComment with validation, target resolution, and PR context detection
  • Includes full schema definitions, TypeScript types, Go configuration parsing, and documentation

Reviewed changes

Copilot reviewed 24 out of 26 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
schemas/agent-output.json Adds JSON schema for reply_to_pull_request_review_comment output type with comment_id, body, and optional pull_request_number fields
pkg/parser/schemas/main_workflow_schema.json Adds configuration schema with max, target, target-repo, allowed-repos, footer, and github-token options
pkg/workflow/reply_to_pr_review_comment.go Implements Go config parser with footer (*bool), target, and repository options
pkg/workflow/compiler_types.go Adds ReplyToPullRequestReviewCommentConfig to SafeOutputsConfig struct
pkg/workflow/safe_outputs_*.go Integrates new output type across config extraction, validation, permissions, imports, and handler registry
pkg/workflow/tool_description_enhancer.go Adds max constraint description for the reply tool
pkg/workflow/safe_output_validation_config.go Adds validation rules for comment_id, body, and pull_request_number fields
actions/setup/js/reply_to_pr_review_comment.cjs Implements handler factory with validation, target resolution, PR context checking, and API integration
actions/setup/js/reply_to_pr_review_comment.test.cjs Comprehensive test suite covering success cases, validation, context handling, and error scenarios
actions/setup/js/safe_outputs_tools.json Adds tool definition for AI agent consumption
actions/setup/js/safe_output_*_handler_manager.cjs Registers handler in both handler managers
actions/setup/js/types/*.d.ts Adds TypeScript type definitions for the new output item and config
docs/src/content/docs/reference/*.md Documents the new feature with configuration examples and usage guidelines
.devcontainer/devcontainer.json Adds permissions for strawgate/gh-aw repository (appears unrelated to PR purpose)

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

@pelikhan
Copy link
Contributor

So many files... needs a major cleanup eventually

@pelikhan
Copy link
Contributor

merge main, recompile, lint, fix tests

@strawgate
Copy link
Contributor Author

I think the linting/testing issues are issues on main

@pelikhan
Copy link
Contributor

Yes fixing

@pelikhan
Copy link
Contributor

main is clean

@pelikhan
Copy link
Contributor

there is one failure related to docker, but it is otherwise clean. run make agent-finish

@pelikhan
Copy link
Contributor

Should be clean now. You can also ask your agent to validate your safe output against the specification.

@strawgate
Copy link
Contributor Author

make agent-finish has no changes. Spec passes.

Would you like me to add a reply_to_pull_request_review_comment section to the spec?

@pelikhan
Copy link
Contributor

pelikhan commented Feb 14, 2026

Yes. Use the w3c-spec-writer agent to update the spec

@strawgate
Copy link
Contributor Author

added spec

@strawgate
Copy link
Contributor Author

👀

@pelikhan pelikhan merged commit 2d25d30 into github:main Feb 14, 2026
50 of 54 checks passed
@pelikhan
Copy link
Contributor

Those errors are mine.

@strawgate
Copy link
Contributor Author

not all of them it would appear 😢

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add safe outputs for replying to and resolving pull request review comments

2 participants