pwntester / octo.nvim

Edit and review GitHub issues and pull requests from the comfort of your favorite editor
MIT License
2.24k stars 124 forks source link

"go to file" function only looks at current directory, not git root #539

Closed mogest closed 3 weeks ago

mogest commented 2 months ago

Issue Description

"go to file" function only looks at current directory, not git root

Type: bug report

Describe what happened (or what feature you want)

When pressing gf while on a comment tagged to a file/line in a PR, with the current working directory not being at the root of the git repository, an error is returned.

Describe what you expected to happen

The file would be found and gf would take the user to the file.

How to reproduce it (as minimally and precisely as possible)

  1. cd into a subdirectory of a git repository
  2. open a PR with comments that are tagged to files
  3. press gf to try to go to one of the files

Tell us your environment

MacOS, neovim 0.9.5, latest octo.nvim

Anything else we need to know?

PR incoming.