Skip to content

Fix PR review comments default value mismatch (schema: 1 → 10)#6289

Merged
pelikhan merged 4 commits into
mainfrom
copilot/fix-pr-review-comments-default
Dec 12, 2025
Merged

Fix PR review comments default value mismatch (schema: 1 → 10)#6289
pelikhan merged 4 commits into
mainfrom
copilot/fix-pr-review-comments-default

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 12, 2025

Schema documented create-pull-request-review-comment.max default as 1, but runtime used 10. This caused users to expect 1 comment by default but receive up to 10.

Changes

  • Updated schema description in pkg/parser/schemas/main_workflow_schema.json from (default: 1) to (default: 10)
  • Updated documentation in docs/src/content/docs/reference/safe-outputs.md (table and example)
  • Updated reference documentation in docs/src/content/docs/reference/frontmatter-full.md

Rationale
Changed schema to match code rather than code to match schema to avoid breaking existing workflows. Default of 10 is more practical for code reviews.

The code implementation remains unchanged:

// pkg/workflow/safe_outputs_config.go:675
maxValue := 10 // default
if data.SafeOutputs.CreatePullRequestReviewComments.Max > 0 {
    maxValue = data.SafeOutputs.CreatePullRequestReviewComments.Max
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login wykE8gPMw GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet ortc�� it/ref/tags/v5 stmain.go ps GOINSECURE GOMOD GOMODCACHE ps (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login -json GO111MODULE ache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env action.git action.git 9364113/b130/vet.cfg GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login it/ref/tags/v5 GO111MODULE ab75a563189d0c6a8c2f605d085cf618444/log.json GOINSECURE bnext/gh-aw/pkg/-1 -d/gh-aw go env oad-artifact.git -d/gh-aw /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE 9364113/b369/importcfg (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[plan] Fix PR review comments default value mismatch</issue_title>
<issue_description>## Objective

Resolve the mismatch between schema documentation (default: 1) and code implementation (default: 10) for the safe-outputs.create-pull-request-review-comment.max field.

Context

Severity: HIGH - Users reading the schema expect 1 PR review comment by default, but the runtime creates up to 10, causing unexpected behavior.

Current State:

  • Schema (pkg/parser/schemas/main_workflow_schema.json): Description says (default: 1)
  • Code (pkg/workflow/safe_outputs_config.go:675): Sets maxValue := 10

Decision Required

Choose one approach:

Option A: Update schema to match code

  • Change schema description from (default: 1) to (default: 10)
  • Preserves current runtime behavior

Option B: Update code to match schema

  • Change code from maxValue := 10 to maxValue := 1
  • Makes runtime match documented behavior

Recommended Approach

Option A is recommended because:

  • Changing the default to 1 would be a breaking change
  • Current default of 10 is more practical for code reviews
  • Schema documentation is easier to update than user workflows

Files to Modify

  • pkg/parser/schemas/main_workflow_schema.json - Update the description for safe-outputs.create-pull-request-review-comment.max

Acceptance Criteria

AI generated by Plan Command for discussion #6199

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits December 12, 2025 19:15
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
- Update schema description from (default: 1) to (default: 10)
- Update documentation table default from 1 to 10
- Update documentation example comment from (default: 1) to (default: 10)
- Rebuild binary with embedded schema changes

Fixes: #6256

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
All changes completed and validated:
- Schema updated to document default: 10
- Documentation updated in two places
- Binary rebuilt with embedded schema
- All tests pass
- Recompile works correctly

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix default value mismatch for PR review comments Fix PR review comments default value mismatch (schema: 1 → 10) Dec 12, 2025
Copilot AI requested a review from mnkiefer December 12, 2025 19:29
@pelikhan pelikhan marked this pull request as ready for review December 12, 2025 20:30
@pelikhan pelikhan merged commit eb51594 into main Dec 12, 2025
4 checks passed
@pelikhan pelikhan deleted the copilot/fix-pr-review-comments-default branch December 12, 2025 20:30
@lpcox lpcox mentioned this pull request May 22, 2026
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.

[plan] Fix PR review comments default value mismatch

3 participants