AGhost-7 / critiq.vim

Github code reviews from Neovim
72 stars 4 forks source link

Utilize .netrc #25

Open SevereOverfl0w opened 5 years ago

SevereOverfl0w commented 5 years ago

I'm not sure if this is possible, but rhubarb works by using the .netrc file in the home directory.

This means no environment variables need setting, and also means I can configure both plugins the same way.

AGhost-7 commented 5 years ago

Would you be interested in opening a PR for this?

SevereOverfl0w commented 5 years ago

Absolutely. You have a couple of options for how to do this though:

  1. Forced netrc: Get rid of GH_USER and GH_PASS altogether. This would force error handling down the pipeline to the place where curl is called. This is nice because there's less paths of code to combine.
  2. Hybrid, support both. If GH_USER/GH_PASS is set, use it, else pass --netrc to curl. Downside of this is removing the current error checking in the plugin, as you can't know which approach the user intends.
AGhost-7 commented 5 years ago

I'm not a fan of making a breaking change. Do you think we could put it behind a flag like with the oauth?