Skip to content

Commit

Permalink
Add changes.sh script (#1416)
Browse files Browse the repository at this point in the history
The changes.sh script can be used to generate PR descriptions for badger
update PRs on dgraph.
  • Loading branch information
Ibrahim Jarif authored Jul 16, 2020
1 parent 8b7a013 commit 32198b4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions changes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/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" \

0 comments on commit 32198b4

Please sign in to comment.