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

Add monorepo support with new option to allow relative paths #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

santiagodiaz
Copy link
Owner

@santiagodiaz santiagodiaz commented May 23, 2022

What & Why:

When using the github-codeowners tool in a monorepo, we can see an issue when installing the tool in a subdirectory and trying to use the tool commands for the root of the repository.

This is the error when using a command like audit or who:

failed to run audit command RangeError: path should be a `path.relative()`d string, but got "../.dockerignore"

This is caused because of ignore package not accepting file paths like this:

/foo,
./foo,
../foo,
.
..

This PR:

  • Updates ignore package to 5.2.0 version.
  • Adds new option -a, --allow-relative-paths allow relative paths (default: false)
    • This option allows us to place the tool in any subdirectory and audit file paths that were not accepted before

@santiagodiaz santiagodiaz marked this pull request as ready for review May 23, 2022 17:36
@santiagodiaz santiagodiaz changed the title Add mono repo support with new option to allow relative paths Add monorepo support with new option to allow relative paths May 23, 2022
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.

1 participant