Skip to content

Remove overly strict neutralization of issue-closing keywords in PR bodies#17686

Closed
Copilot wants to merge 3 commits intomainfrom
copilot/investigate-escape-issue
Closed

Remove overly strict neutralization of issue-closing keywords in PR bodies#17686
Copilot wants to merge 3 commits intomainfrom
copilot/investigate-escape-issue

Conversation

Copy link
Contributor

Copilot AI commented Feb 22, 2026

neutralizeBotTriggers() was wrapping Fixes #NN, Closes #NN, Resolves #NN etc. in backticks across the sanitization pipeline, converting them to inline code and breaking GitHub's auto-close behavior on merge.

Changes

  • sanitize_content_core.cjs: Remove neutralizeBotTriggers() call from sanitizeContentCore()
  • sanitize_content.cjs: Remove neutralizeBotTriggers import and call from the selective-mention pipeline path
  • Tests: Updated assertions in sanitize_content, sanitize_output, compute_text, and collect_ndjson_output tests to expect passthrough behavior

Before / After

# Before
"This fixes #123 and closes #456" → "This `fixes #123` and `closes #456`"

# After
"This fixes #123 and closes #456" → "This fixes #123 and closes #456"

Cross-repo reference restriction via GH_AW_ALLOWED_GITHUB_REFS / neutralizeGitHubReferences() is unaffected and remains available for controlling which owner/repo#N references are allowed.

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/repos/github/gh-aw/contents/.github%2Fworkflows%2Faudit-workflows.md
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node /opt/hostedtoolcache/node/24.13.0/x64/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/gh-aw/gh-aw/actions/setup/js/node_modules/vitest/dist/workers/forks.js (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>Filtering "Fixes #NN" etc seems to strict</issue_title>
<issue_description>GH-AW appears to suppress "Fixes #NN" and similar in generated PR bodies, converting it to fenced code. This seems too strict and makes the PRs much less useful.

Maybe there's a way to turn this off, but it doesn't seem essential for safety so feels like it should be off by default or just removed

Example fsprojects/FSharp.Data#1607</issue_description>

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

@pelikhan Investigate why "closes ..." was escaped.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 22, 2026 11:54
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…n PR bodies

Issue-closing keywords like "Fixes #123" and "Closes #456" were being
wrapped in backticks by neutralizeBotTriggers(), preventing GitHub
from auto-closing issues when PRs were merged.

This was too strict and made generated PRs less useful, so remove the
filtering entirely from both output and input sanitization pipelines.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate escaping of issue references in PR bodies Remove overly strict neutralization of issue-closing keywords in PR bodies Feb 22, 2026
@pelikhan pelikhan closed this Feb 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.

Filtering "Fixes #NN" etc seems to strict

2 participants