Skip to content

Substring pattern match#32

Draft
chdsbd wants to merge 4 commits intomasterfrom
cdignam/4.2.0
Draft

Substring pattern match#32
chdsbd wants to merge 4 commits intomasterfrom
cdignam/4.2.0

Conversation

@chdsbd
Copy link
Owner

@chdsbd chdsbd commented Mar 14, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 14, 2026 14:15
Copy link

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

Updates the VS Code hover text shown for CODEOWNERS patterns to distinguish non-absolute patterns from exact path matches, and documents the change in the changelog.

Changes:

  • Simplify hover helper text to “Substring pattern match” vs “Matches path exactly”.
  • Add a 4.2.0 changelog entry describing the hover text adjustment.

Reviewed changes

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

File Description
src/codeowners-hover-provider.ts Updates hover description logic for CODEOWNERS path tokens.
CHANGELOG.md Adds a new release entry documenting the hover text change.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 44 to 46
x,
isPattern
? "Matches all files with same name"
: isDirectory
? `Matches all files in directory and subdirectories`
: `Matches path exactly`,
isPattern ? "Substring pattern match" : `Matches path exactly`,
],

### Changed

- Adjust hover text for substring vs full path matches (#).
Copy link

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

Updates the VS Code hover tooltip for CODEOWNERS path patterns to better explain how patterns match, and publishes a new extension release.

Changes:

  • Simplify hover behavior by removing filesystem checks and generating hover text from pattern syntax (leading /, trailing /, trailing /*).
  • Bump extension version to 4.2.0.
  • Add 4.2.0 changelog entry.

Reviewed changes

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

File Description
src/codeowners-hover-provider.ts Reworks hover text generation for CODEOWNERS patterns; removes fs/path-based directory probing.
package.json Version bump to 4.2.0.
CHANGELOG.md Adds release notes for 4.2.0.

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

You can also share your feedback on Copilot code review. Take the survey.

const lines: string[] = []

if (hasLeadingSlash) {
lines.push("**Anchored to repo root** — only matches at the top level")
lines.push("**Anchored to repo root** — only matches at the top level")
} else {
lines.push(
"**Matches at any depth** — applies to this path anywhere in the repository)",

### Changed

- Adjust hover text for substring vs full path matches (#).
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