[PATCH] D46192: Script to match open Phabricator reviews with potential reviewers

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 30 04:26:23 PDT 2018


JDevlieghere added a comment.

In https://reviews.llvm.org/D46192#1082049, @lebedev.ri wrote:

> This should probably go into `llvm/utils`, not the root.
>
> It would also be good to have the opposite script - "given `git diff` / commits, whom should i add as reviewers?"


I once wrote the following one-liner to do this. It works pretty well but it can be *very* slow. It will suggest a top 10 of reviewers for your staged changes.

`git diff --name-only --cached | xargs -n 1 git blame --porcelain | grep  \"^author \" | sort | uniq -c | sort -nr | head -10`

> It could evaluate `CODE_OWNERS.txt`, `git log` / `git shortlog -sne` of the changed files, `git blame`.




https://reviews.llvm.org/D46192





More information about the llvm-commits mailing list