1b9116f225
This allows the user to specify the private key to use to connect to the gerrit server, and to specify which gerrit server to use. Change-Id: I391e9a81350dfc8820d181392574b2cd8f2c3f6a
28 lines
571 B
Bash
Executable File
28 lines
571 B
Bash
Executable File
#!/bin/bash
|
|
|
|
projects=projects/*.json
|
|
|
|
if [ -n "${GERRIT_USER}" ] ; then
|
|
EXTRA_ARGS="-u ${GERRIT_USER}"
|
|
fi
|
|
|
|
if [ -n "${GERRIT_KEY}" ] ; then
|
|
EXTRA_ARGS="${EXTRA_ARGS} -k ${GERRIT_KEY}"
|
|
fi
|
|
|
|
if [ -n "${GERRIT_SERVER}" ] ; then
|
|
EXTRA_ARGS="${EXTRA_ARGS} --server ${GERRIT_SERVER}"
|
|
fi
|
|
|
|
metadata() {
|
|
date -u
|
|
echo -n "reviewstats HEAD: "
|
|
git rev-parse HEAD
|
|
echo
|
|
}
|
|
|
|
for project in ${projects} ; do
|
|
project_base=$(basename $(echo ${project} | cut -f1 -d'.'))
|
|
(metadata && reviews_for_bugs -p ${project} ${EXTRA_ARGS}) > results/${project_base}-reviews-for-bugs.txt
|
|
done
|