Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pattern not ending in slash not matching directory #36

Conversation

inkel
Copy link
Contributor

@inkel inkel commented Jun 27, 2024

I've found that when having an entry like /foo/bar @foo in the CODEOWNERS file the library properly reports @foo as the owner for /foo/bar and /foo/bar/quux but not for /foo/bar/ (note the slash at the end). This PR adds tests for this case and fixes the regular expression to take this case into account.

@hairyhenderson
Copy link
Owner

Thanks for this @inkel! Can you rebase? I'll merge afterwards.

I've found that when having an entry like `/foo/bar @foo` in the CODEOWNERS
file the library properly reports `@foo` as the owner for `/foo/bar`
and `/foo/bar/quux` but not for `/foo/bar/` (note the slash at the
end). This PR adds tests for this case and fixes the regular
expression to take this case into account.
@inkel inkel force-pushed the inkel/fix-re-pattern-not-ending-slash branch from 04b82d2 to 4d9c7b1 Compare June 27, 2024 13:01
@inkel
Copy link
Contributor Author

inkel commented Jun 27, 2024

Done! <3

@hairyhenderson hairyhenderson merged commit ece93bb into hairyhenderson:main Jun 27, 2024
4 checks passed
@inkel inkel deleted the inkel/fix-re-pattern-not-ending-slash branch June 27, 2024 13:18
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