Skip to content

Comments

Add spacing after title prefixes ending with ] or -#16517

Merged
pelikhan merged 2 commits intomainfrom
copilot/add-space-after-title-prefix
Feb 18, 2026
Merged

Add spacing after title prefixes ending with ] or -#16517
pelikhan merged 2 commits intomainfrom
copilot/add-space-after-title-prefix

Conversation

Copy link
Contributor

Copilot AI commented Feb 18, 2026

Title prefixes ending with ] or - were concatenated directly to titles without spacing, producing malformed titles like [Contribution Check Report]Contribution Check.

Changes

  • sanitize_title.cjs: Modified applyTitlePrefix() to automatically insert a space when the prefix ends with ] or - and lacks a trailing space
  • create_issue.cjs: Updated createParentIssueTemplate() to use applyTitlePrefix() instead of direct string concatenation
  • sanitize_title.test.cjs: Added test coverage for ] and - suffix scenarios

Example

// Before
applyTitlePrefix("Contribution Check", "[Contribution Check Report]")
// "[Contribution Check Report]Contribution Check"

// After
applyTitlePrefix("Contribution Check", "[Contribution Check Report]")
// "[Contribution Check Report] Contribution Check"

Prefixes ending with other characters (:, emojis, etc.) preserve existing behavior.

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

When an item has a title prefix ending with ] or -, ensure there is a space character with the next letter.

See #16499


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

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Ensure space after title prefix ending with ] or - Add spacing after title prefixes ending with ] or - Feb 18, 2026
Copilot AI requested a review from pelikhan February 18, 2026 05:15
@pelikhan pelikhan marked this pull request as ready for review February 18, 2026 05:18
Copilot AI review requested due to automatic review settings February 18, 2026 05:18
@pelikhan pelikhan merged commit c286af9 into main Feb 18, 2026
153 checks passed
@pelikhan pelikhan deleted the copilot/add-space-after-title-prefix branch February 18, 2026 05:21
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 fixes a spacing issue where title prefixes ending with ] or - were concatenated directly to titles without spacing, resulting in malformed titles like [Contribution Check Report]Contribution Check.

Changes:

  • Modified applyTitlePrefix() to automatically insert a space when the prefix ends with ] or - and lacks a trailing space
  • Updated createParentIssueTemplate() to use applyTitlePrefix() instead of direct string concatenation
  • Added comprehensive test coverage for the new spacing behavior

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
actions/setup/js/sanitize_title.cjs Added logic to automatically insert a space after prefixes ending with ] or - when no trailing space exists
actions/setup/js/create_issue.cjs Updated parent issue template creation to use applyTitlePrefix() for consistent spacing
actions/setup/js/sanitize_title.test.cjs Added test cases covering prefixes ending with ], -, existing trailing spaces, and other characters

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

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