Mic92 / nixpkgs-review

Review pull-requests on https://github.com/NixOS/nixpkgs
MIT License
356 stars 59 forks source link

add branch command (draft) #272

Open milahu opened 2 years ago

milahu commented 2 years ago

fix #271

mostly copy-paste of the pr command

Mic92 commented 2 years ago

Implementation looks good so far. As you already put it out a test would be nice and also documentation in the README.

milahu commented 2 years ago

6fe1fee1a7b57bc9d865940a76cfca2998fb263a fixes my caller error

nix-review rev -r https://github.com/delroth/nixpkgs -b gstreamermm-build-fix a9f5b7dbfe16c81a026946f2c9931479be31171d

because the branch gstreamermm-build-fix is a9f5b7dbfe16c81a026946f2c9931479be31171d

also there is a bug in rev. when i call

nix-review rev -r https://github.com/delroth/nixpkgs a9f5b7dbfe16c81a026946f2c9931479be31171d

then nix-review fetches the master branch of https://github.com/delroth/nixpkgs but the fork is out-of-sync with NixOS/nixpkgs, so as base commit i get https://github.com/delroth/nixpkgs/commit/045a4a4b724fe344ad1f65edff44b8d824e3e79e (2018-10-13)

nix-review should get the ahead status of the branch, to find the base commit https://github.com/delroth/nixpkgs/commit/19e187fbabcefa3f3e608b94ed809f91524501bb (2022-05-05) see stackoverflow: git ahead behind info

milahu commented 2 years ago

now this works

nixpkgs-review branch https://github.com/milahu/nixpkgs/tree/qt6-631 -C ~/nixpkgs

this PR still needs some polish ...