leonardochaia / dotnet-affected-action

.NET tool for determining which projects are affected by a set of changes. Useful for large projects or monorepos.
https://github.com/leonardochaia/dotnet-affected
MIT License
15 stars 3 forks source link

Exception when `solution-path` is not in git root directory #237

Closed BenvdStouwe closed 1 year ago

BenvdStouwe commented 1 year ago

Hi, thanks for your work on dotnet-affected and this action :)

We have solution files that are not in de git root directory. When we pass the path to the solution as the solution-path variable, this exception is thrown:

Unhandled exception: LibGit2Sharp.RepositoryNotFoundException: Path '/home/runner/work/<subdirectory>' doesn't point at a valid Git repository or workdir.

To me it seems that when a solution-path variable is used, the --repository-path parameter for the underlying dotnet-affected vall should be set to $GITHUB_WORKSPACE. Is this something you agree on? I could look at the implementation myself but first I'd like your approval.

BenvdStouwe commented 1 year ago

I examined the source code and think I implemented a pretty easy solution in #238 :)

BenvdStouwe commented 1 year ago

@leonardochaia thanks for accepting the PR that closes this issue. When can we expect it to be included in the action? I'm not trying to push you or anything, just want to know when it would be available and wouldn't mind if that could take a while.

leonardochaia commented 1 year ago

hi @BenvdStouwe ! I forgot to create the new release.

v2.1.1 has been released including your fix.

Thank you!! Leo.