Skip to content

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

Open
santiagodiaz wants to merge 4 commits intomasterfrom
monorepo-support
Open

Add monorepo support with new option to allow relative paths#1
santiagodiaz wants to merge 4 commits intomasterfrom
monorepo-support

Conversation

@santiagodiaz
Copy link
Copy Markdown
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