Should be used with a pager with syntax highlighting for diff
patches like bat
: cargo install bat
Download current PR state as a patch series (Format is mbox
file containing all the commits as email/patches):
If PR url is https://github.com/org/repo/pull/37
, download:
https://github.com/repo/pull/37.patch
as a text file.
% ./patchviewer.py 37.patch
0 [PATCH 1/4] aaaaaaaa
1 [PATCH 2/4] adkfjslkdfjsdklfj
2 [PATCH 3/4] my hands are typing words
3 [PATCH 4/4] haaaaaaaaands
patches: list
>>> patches[2].view() # launches diff in pager
>>>