Skip to content

fix: avoid partial package matches in where - #246

Merged
andrew merged 1 commit into
git-pkgs:mainfrom
sanmaxdev:fix/where-exact-package-boundary
Jun 28, 2026
Merged

andrew merged 1 commit into
git-pkgs:mainfrom
sanmaxdev:fix/where-exact-package-boundary

Conversation

@sanmaxdev

@sanmaxdev sanmaxdev commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • tighten where package-name matching so hyphenated substrings like my-left-pad do not match left-pad
  • keep existing GitHub Actions matching such as actions/checkout@...
  • add regression coverage for the hyphenated substring case

Testing

  • go test ./cmd -run 'TestSearchFileForPackage|TestWhereCommandWithWorkflows' -count=1
  • go test ./cmd -count=1
  • go build ./...
  • go test ./... -count=1
  • go tool golangci-lint run ./...

Closes #242

@andrew
andrew merged commit 04f5ad0 into git-pkgs:main Jun 28, 2026
4 checks passed
@sanmaxdev
sanmaxdev deleted the fix/where-exact-package-boundary branch June 28, 2026 06:40
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.

git pkgs where can match package-name substrings

2 participants