Skip to content

Commit

Permalink
update CODEOWNERS docs
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Aug 16, 2019
1 parent 7dafe73 commit 72cb28c
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,26 @@ Generating

.. code:: sh
for f in $(git ls-files); do
# filename
echo -n "$f "
# author emails if loc distribution >= 30%
git fame -esnwMC --incl "$f" | tail -n+7 | tr '/' '|' \
| awk -F '|' '$6 >= 30 {print $2}' | xargs echo
done >> .github/CODEOWNERS
# bash syntax function for current directory git repository
owners(){
for f in $(git ls-files); do
# filename
echo -n "$f "
# author emails if loc distribution >= 30%
git fame -esnwMC --incl "$f" | tr '/' '|' \
| awk -F '|' '(NR>6 && $6>=30) {print $2}' \
| xargs echo
done
}
# print to screen and file
owners | tee .github/CODEOWNERS
# same but with `tqdm` progress for large repos
owners \
| tqdm --total $(git ls-files | wc -l) \
--unit file --desc "Generating CODEOWNERS" \
> .github/CODEOWNERS
Contributions
-------------
Expand Down

0 comments on commit 72cb28c

Please sign in to comment.