Files
zapdb/changes.sh
Ibrahim JarifandGitHub 4e61667f3a Add changes.sh script (#1416)
The changes.sh script can be used to generate PR descriptions for badger
update PRs on dgraph.
2020-07-16 18:16:58 +05:30

19 lines
372 B
Bash
Executable File

#!/bin/bash
set -e
GHORG=${GHORG:-dgraph-io}
GHREPO=${GHREPO:-badger}
cat <<EOF
This description was generated using this script:
\`\`\`sh
`cat $0`
\`\`\`
Invoked as:
`echo GHORG=${GHORG} GHREPO=${GHREPO} $(basename $0) ${@:1}`
EOF
git log --oneline --reverse ${@:1} \
| sed -E "s/^(\S{7}\s)//g" \
| sed -E "s/([\s|\(| ])#([0-9]+)/\1${GHORG}\/${GHREPO}#\2/g" \