multi-gitter
multi-gitter copied to clipboard
feat: review command
What does this change
Hey me again 🙈 ,
This pr adds the ability for approving pull requests supported by all platforms. Basically reviewers now get an easy option to approve pr's made by multi-gitter (or other(s)). Usually pull requests require approval in branch protected repos and there is currently no good way to batch approve multi pr's. For example we collect all batch operations in a repository, a reviewer can grab the config from there and start a straight forward review process with the same tool. (Using the --batch option this could even be fully automated in a ci pipeline).
This pr adds the review
command with a couple of options:
-
--comment
for a review comment (can also be overwritten while reviewing pr's) -
--all
to batch review all of them. Basically review a diff output from all pr's. Useful if you have 100 pr's with a single line change where you don't want to review each individually. -
--batch=x
Approve/Decline/Comment all targeted pull requests without asking questions -
--no-pager
This pr pipes the diffs to a pager (less, more (windows), PAGER env). If no pager should be used one can dump to stdout directly using this option -
--include-approved
By default approve ignores pull requests which are already approved by the reviewing person.
example using vim with syntax highlighting:
PAGER=vim multi-gitter review --log-level=debug --config config.yaml -c "lgtm" --all
What issue does it fix
Currently reviewing is hard. If you open 100 pr's with a simple change you either have to wait until people reviewed them, try to push them or whatever... There are also some workarounds like verify 2 and then batch approve everything via the api.
Notes for the reviewer
- No tests added so far, waiting for your comments if this will be merged.
- I did not test it on windows yet
- I was unable to test bitbucket so far
Checklist
- [x] Made sure the PR follows the CONTRIBUTING.md guidelines
- [ ] Tests if something new is added
Hey. Thanks for the PR! But please create an issue discussion about the addition so that you don't create anything unnecessarily ;)
I do think this is a good addition but will have to take some time before looking at it since the changes are extensive. Let me get back to you with a review in a few days :)
Hey. Thanks for the PR! But please create an issue discussion about the addition so that you don't create anything unnecessarily ;)
I do think this is a good addition but will have to take some time before looking at it since the changes are extensive. Let me get back to you with a review in a few days :)
Yeah should have commented (fixes #295). Sure take your time 👍🏻
Just used this new command to batch review and merge hundred pr's opened by renovate (not created using multi-gitter itself). Thats also a nice use case for this command.
Hi @lindell,
Firstly thank you for sharing your excellent work that is this tool. Is there anything else left to do with this PR before you would merge it? This will be super handy for the core maintainers of the tools under https://github.com/zosOpenTools/