That approach is faster and doesn't require huge download to determine the total number of commits. Signed-off-by: Przemo Firszt <przemo@firszt.eu>
5 lines
226 B
Plaintext
5 lines
226 B
Plaintext
function git_commits_no {
|
|
commits=$(curl -s 'https://api.github.com/repos/FreeCAD/FreeCAD/compare/120ca87015...master' | grep "ahead_by" | sed -s 's/ //g' | sed -s 's/"ahead_by"://' | sed -s 's/,//')
|
|
echo $((commits + 1))
|
|
}
|