mirror of
https://github.com/jlengrand/gource-organization-vizualization.git
synced 2026-03-10 08:21:21 +00:00
Adding script with stats
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -4,4 +4,5 @@ gource.ppm
|
||||
gource.mp4
|
||||
*.txt
|
||||
*.mp4
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
*.bak
|
||||
32
count-commits.sh
Executable file
32
count-commits.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
# You need to have jq installed
|
||||
|
||||
echo "COUNTING COMMITS"
|
||||
|
||||
sum=0
|
||||
for OUTPUT in $(ls -d */ | grep adyen)
|
||||
do
|
||||
cd $OUTPUT;
|
||||
number=$(git rev-list --count HEAD --after=2021-01-01)
|
||||
sum=$((sum + number))
|
||||
cd ..;
|
||||
done
|
||||
echo "The total number of commits across repositories is: $sum"
|
||||
|
||||
echo "COUNTING PRs"
|
||||
|
||||
prs=$(curl -s "https://api.github.com/search/issues?q=org:adyen%20type:pr%20is:merged%20merged:%3E=2021-01-01" | jq '.total_count')
|
||||
|
||||
echo "The total number of merged PRs across repositories is: $prs"
|
||||
|
||||
echo "COUNTING Issues"
|
||||
|
||||
issues=$(curl -s "https://api.github.com/search/issues?q=org:adyen%20type:issue%20closed:%3E2021-01-01" | jq '.total_count')
|
||||
|
||||
echo "The total number of closed Issues across repositories is: $issues"
|
||||
|
||||
echo "COUNTING Contributors"
|
||||
|
||||
contributors=$(python3 unique-commiters.py)
|
||||
echo "The total number of contributors across repositories is: $contributors"
|
||||
11
unique-commiters.py
Normal file
11
unique-commiters.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# This script depends on the combined.txt file created by all-repos.sh to be present.
|
||||
|
||||
|
||||
commiters = []
|
||||
with open('combined.txt', 'r') as reader:
|
||||
for line in reader.readlines():
|
||||
author = line.split("|")[1]
|
||||
if author not in commiters:
|
||||
commiters.append(author)
|
||||
|
||||
print(str(len(commiters)))
|
||||
Reference in New Issue
Block a user