aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-02-09 12:52:34 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-02-09 12:53:00 +0100
commitf69941620ba8716679c141b973dfa24d5623b9ae (patch)
tree89179c6f8f4103c098bbdeb893f11399f02216b8 /contrib
parent7225577f6b8bcdc3b4f109717b11a1a6a8ee3ed6 (diff)
parent1078fb08851442bcd7750c3d5015dc1fe7e4d927 (diff)
Merge #5623: Make nicer pull request merge messages
1078fb0 Make nicer pull request merge messages (BtcDrak)
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/devtools/github-merge.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/devtools/github-merge.sh b/contrib/devtools/github-merge.sh
index ec7a1f4c4b..7e3dad49d2 100755
--- a/contrib/devtools/github-merge.sh
+++ b/contrib/devtools/github-merge.sh
@@ -82,13 +82,15 @@ function cleanup() {
}
# Create unsigned merge commit.
+PRTITLE=`curl -s https://api.github.com/repos/$REPO/pulls/$PULL | grep -e ' "title": ".*",'| awk -F'"' '{print $4}'`
+MERGEMESSAGE="Merge #$PULL: $PRTITLE"
(
- echo "Merge pull request #$PULL"
+ echo $MERGEMESSAGE
echo ""
git log --no-merges --topo-order --pretty='format:%h %s (%an)' pull/"$PULL"/base..pull/"$PULL"/head
)>"$TMPDIR/message"
if git merge -q --commit --no-edit --no-ff -m "$(<"$TMPDIR/message")" pull/"$PULL"/head; then
- if [ "d$(git log --pretty='format:%s' -n 1)" != "dMerge pull request #$PULL" ]; then
+ if [ "d$(git log --pretty='format:%s' -n 1)" != "d$MERGEMESSAGE" ]; then
echo "ERROR: Creating merge failed (already merged?)." >&2
cleanup
exit 4