Skip to content

Commit

Permalink
scripts: fix authors script to take a ref (tendermint#7051)
Browse files Browse the repository at this point in the history
This script is referenced from the release documentation, we should make sure it's functional. This is helpful in generating the "Special Thanks" section of the changelog.
  • Loading branch information
williambanfield authored Oct 4, 2021
1 parent b30ec89 commit c201e3b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions scripts/authors.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#! /bin/bash

# Usage:
# `./authors.sh`
# Print a list of all authors who have committed to develop since master.
#
# `./authors.sh <email address>`
# Lookup the email address on Github and print the associated username
set -euo pipefail

author=$1
ref=$1

if [[ "$author" == "" ]]; then
git log master..develop | grep Author | sort | uniq
if [[ ! -z "$ref" ]]; then
git log master..$ref | grep Author | sort | uniq
else
curl -s "https://api.github.com/search/users?q=$author+in%3Aemail&type=Users&utf8=%E2%9C%93" | jq .items[0].login
cat << EOF
Usage:
./authors.sh <ref>
Print a list of all authors who have committed to the codebase since the supplied commit ref.
EOF
fi

0 comments on commit c201e3b

Please sign in to comment.