Skip to content

Set default max to 1 for safe outputs that were originally 1#19620

Closed
Copilot wants to merge 4 commits intomainfrom
copilot/update-default-max-value-safe-output
Closed

Set default max to 1 for safe outputs that were originally 1#19620
Copilot wants to merge 4 commits intomainfrom
copilot/update-default-max-value-safe-output

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Safe output types that did not have an explicitly chosen default are set to max: 1. Types with intentionally higher defaults retain their original values.

Changes

  • safe_output_validation_config.go — Set DefaultMax: 1 for types that did not have a previously assigned default (e.g. create_issue, create_agent_session, add_comment, create_pull_request, assign_milestone, assign_to_agent, assign_to_user, update_issue, update_pull_request, submit_pull_request_review, create_discussion, close_discussion, close_issue, close_pull_request, update_release, noop, create_project)

  • Types with intentionally higher defaults are unchangedadd_labels (5/3), add_reviewer (3), remove_labels (5/3), set_issue_type (5), hide_comment (5), link_sub_issue (5), update_project (10), create_project_status_update (10), autofix_code_scanning_alert (10), create_code_scanning_alert (40), upload_asset (0/unlimited), push_to_pull_request_branch (0/unlimited), mark_pull_request_as_ready_for_review (10), reply_to_pull_request_review_comment (10), resolve_pull_request_review_thread (10), missing_tool (20), missing_data (20)

Original prompt

Ensure that the default max value of any safe output is 1 unless specifically specified. Review each safe output and update it.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 2 commits March 4, 2026 15:55
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor

@pelikhan pelikhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot leave all default != 1 to their original value.

autofixCodeScanningAlertLog.Print("Parsing autofix-code-scanning-alert configuration")
addCodeScanningAutofixConfig := &AutofixCodeScanningAlertConfig{}
addCodeScanningAutofixConfig.Max = defaultIntStr(10) // Default max is 10
addCodeScanningAutofixConfig.Max = defaultIntStr(1) // Default max is 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot leave at 10

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored to 10 in 8462b21.

prReviewCommentsConfig.TargetRepoSlug = targetRepoSlug

// Parse common base fields with default max of 10
c.parseBaseSafeOutputConfig(configMap, &prReviewCommentsConfig.BaseSafeOutputConfig, 10)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot leave at 10

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored to 10 in 8462b21.

createProjectStatusUpdateLog.Print("Parsing create-project-status-update configuration")
config := &CreateProjectStatusUpdateConfig{}
config.Max = defaultIntStr(10) // Default max is 10
config.Max = defaultIntStr(1) // Default max is 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot leave at 10

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored to 10 in 8462b21.

}

// Parse common base fields with default max of 5
c.parseBaseSafeOutputConfig(configMap, &hideCommentConfig.BaseSafeOutputConfig, 5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot leave at 5

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored to 5 in 8462b21.

linkSubIssueConfig.SafeOutputTargetConfig = targetConfig

// Parse common base fields with default max of 5
c.parseBaseSafeOutputConfig(configMap, &linkSubIssueConfig.BaseSafeOutputConfig, 5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot leave at 5

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored to 5 in 8462b21.


// Parse common base fields with default max of 10
c.parseBaseSafeOutputConfig(configMap, &config.BaseSafeOutputConfig, 10)
c.parseBaseSafeOutputConfig(configMap, &config.BaseSafeOutputConfig, 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot leave at 10

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored to 10 in 8462b21.

// Parse common base fields with default max of 10
c.parseBaseSafeOutputConfig(configMap, &config.BaseSafeOutputConfig, 10)
// Parse common base fields with default max of 1
c.parseBaseSafeOutputConfig(configMap, &config.BaseSafeOutputConfig, 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot leave at 10

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored to 10 in 8462b21.

Copilot AI changed the title [WIP] Update default max value for safe outputs to 1 Set default max to 1 for all safe outputs Mar 4, 2026
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

@copilot leave all default != 1 to their original value.

Reverted in 8462b21 — all safe output defaults that were not originally 1 have been restored to their original values.

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/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha -unreachable=false /tmp/go-build586551351/b017/vet.cfg 551351/b286/vet.cfg (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -bool -buildtags /snap/bin/bash -errorsas -ifaceassert -nilfunc bash --no�� --noprofile -tests /usr/bin/bash (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha se 551351/b239/vet.cfg nfig/composer/vendor/bin/bash (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha HEAD (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel (http block)
  • https://api.github.com/repos/actions/download-artifact/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha -safe-output^{commit} (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/download-artifact/git/ref/tags/v8 --jq .object.sha _.a (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha HEAD (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha se 551351/b115/vet.cfg bin/bash (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --show-toplevel (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha se 551351/b170/vet.cfg ash (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha se 551351/b263/vet.cfg tnet/tools/bash (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq .object.sha (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha logs/user.env (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha -safe-output^{commit} (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha (http block)

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

Copilot AI changed the title Set default max to 1 for all safe outputs Set default max to 1 for safe outputs that were originally 1 Mar 4, 2026
@pelikhan pelikhan closed this Mar 4, 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.

2 participants