madjar / nox

Tools to make nix nicer to use
MIT License
308 stars 35 forks source link

nox-review: Allow URLs to pull requests as well in 'nox-review pr' #78

Closed dezgeg closed 7 years ago

dezgeg commented 7 years ago

This allows users to be lazier and just copy the pull request URL from the browser's address bar. That is, the following commands do the same thing:

$ nox-review pr https://github.com/NixOS/nixpkgs/pull/12345
$ nox-review pr 12345

This also does the right thing on other repositories, avoiding the need for the --slug option when an URL is given. E.g. these are again equivalent:

$ nox-review pr https://github.com/mozilla/nixpkgs-mozilla/pull/58
$ nox-review pr --slug mozilla/nixpkgs-mozilla 58

Inspired by the 'hub' tool which allows similar syntax ('hub checkout https://github.com/NixOS/nixpkgs/pull/12345') to easily checkout pull requests.

madjar commented 7 years ago

That is awesome, thanks!