Skip to content

Commit 32198b4

Browse files
author
Ibrahim Jarif
authored
Add changes.sh script (hypermodeinc#1416)
The changes.sh script can be used to generate PR descriptions for badger update PRs on dgraph.
1 parent 8b7a013 commit 32198b4

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

changes.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
set -e
4+
GHORG=${GHORG:-dgraph-io}
5+
GHREPO=${GHREPO:-badger}
6+
cat <<EOF
7+
This description was generated using this script:
8+
\`\`\`sh
9+
`cat $0`
10+
\`\`\`
11+
Invoked as:
12+
13+
`echo GHORG=${GHORG} GHREPO=${GHREPO} $(basename $0) ${@:1}`
14+
15+
EOF
16+
git log --oneline --reverse ${@:1} \
17+
| sed -E "s/^(\S{7}\s)//g" \
18+
| sed -E "s/([\s|\(| ])#([0-9]+)/\1${GHORG}\/${GHREPO}#\2/g" \

0 commit comments

Comments
 (0)