pwntester / octo.nvim

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

fix: Use cwd's origin url on `Octo repo view` when no argument is passed #417

Closed jarviliam closed 10 months ago

jarviliam commented 11 months ago

Describe what this PR does / why we need it

This commit changes the repo view command to fetch the cwd git remote-origin when no repository argument is provided. If its not in a git folder then it will just log an error instead.

Does this pull request fix one issue?

Fixes #413

Describe how you did it

Check cwd is a git folder -> Attempt to fetch origin url -> Pull repository name and pass to edit octo buffer

Describe how to verify it

Run Octo repo view in a folder that has a remote-origin set

Special notes for reviews

pwntester commented 10 months ago

Thanks for the contribution!