fan-tom / intellij-codeowners

Support of CODEOWNERS file in Intellij-based IDEs
MIT License
20 stars 9 forks source link

attribution error #100

Open stevenjonescgm opened 2 years ago

stevenjonescgm commented 2 years ago

I have an issue where this plugin uses gem source CODEOWNERS instead of project root CODEOWNERS.

I have gem "redis-store" and all my files are being attributed to tubbo via https://github.com/redis-store/redis-store/blob/master/CODEOWNERS

commenting out that source file in local cache, this plugin then uses gem "omniauth-auth0"'s CODEOWNERS, etc. perhaps especially when those gems use .github/CODEOWNERS instead of root CODEOWNERS

Complications may include

fan-tom commented 1 year ago

Hi, how can I reproduce the issue? I tried cloning the repo you mentioned, but after bundle install I have no CODEOWNERS files in the project file tree other than the one in the project root with a single * @tubbo line (I assume ruby doesn't install dependencies into the project subdir, like npm does)

stevenjonescgm commented 1 year ago

I was not able to reproduce today with the original complex project. With an example project, it did not produce with just redis-store, but it did reproduce for me when I added omniauth-auth0

The example project is at https://github.com/stevenjonescgm/intellij-codeowners-gem-attribution.

test/system/ex_300_spec.rb was identified as owned by

*   @auth0/dx-sdks-engineer

After reproducing, I tried switching ruby interpreter/gems to localhost and that worked correctly/did not reproduce error. Due to some caching in the plugin, I needed to close and reopen the project window before the change of interpreter was evaluated. I changed the interpreter back to the remote Docker and restarted then issue reproduced again.

Reproducing may involve the plugin parsing some information, then subsequent runs after modifying dependencies. So if it does not reproduce for you on 62213906c862f3d9a620f159d90449cc00fe0ed3, then maybe reset to an earlier commit to configure the IDE then pull and install gems (docker compose up will run bundle install on the remote)