summaryrefslogtreecommitdiff
path: root/contrib/cirrus/success.sh
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2019-09-03 12:50:11 -0400
committerChris Evich <cevich@redhat.com>2019-09-03 16:39:35 -0400
commit34dad57cbcb60747e3337779f1cf2bcec23bb3ee (patch)
treef5f3ebd1a0d8747d0b6ddb8fa75637044836be9b /contrib/cirrus/success.sh
parenta16f63e96e9993a1e2542b6f5c85903cc4659c6e (diff)
downloadpodman-34dad57cbcb60747e3337779f1cf2bcec23bb3ee.tar.gz
podman-34dad57cbcb60747e3337779f1cf2bcec23bb3ee.tar.bz2
podman-34dad57cbcb60747e3337779f1cf2bcec23bb3ee.zip
Cirrus: Update e-mail -> IRC Nick table
Also add fixes to help prevent 'fatal: Invalid revision range' error. Should obtaining all authors from the range still fail, only grab the HEAD commit author as a fallback. Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/success.sh')
-rwxr-xr-xcontrib/cirrus/success.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/cirrus/success.sh b/contrib/cirrus/success.sh
index f2c9fbc7f..30d375d95 100755
--- a/contrib/cirrus/success.sh
+++ b/contrib/cirrus/success.sh
@@ -4,12 +4,14 @@ set -e
source $(dirname $0)/lib.sh
-req_env_var CIRRUS_BRANCH CIRRUS_BUILD_ID CIRRUS_REPO_FULL_NAME
+req_env_var CIRRUS_BRANCH CIRRUS_BUILD_ID CIRRUS_REPO_FULL_NAME CIRRUS_BASE_SHA CIRRUS_CHANGE_IN_REPO
cd $CIRRUS_WORKING_DIR
if [[ "$CIRRUS_BRANCH" =~ "pull" ]]
then
+ echo "Retrieving latest HEADS and tags"
+ git fetch --all --tags
echo "Finding commit authors for PR $CIRRUS_PR"
unset NICKS
if [[ -r "$AUTHOR_NICKS_FILEPATH" ]]
@@ -20,7 +22,8 @@ then
# Depending on branch-state, it's possible SHARANGE could be _WAY_ too big
MAX_NICKS=10
# newline separated
- COMMIT_AUTHORS=$(git log --format='%ae' $SHARANGE | \
+ GITLOG="git log --format='%ae'"
+ COMMIT_AUTHORS=$($GITLOGt $SHARANGE || $GITLOG -1 HEAD | \
sort -u | \
egrep -v "$EXCLUDE_RE" | \
tail -$MAX_NICKS)