Revert "Make nicer pull request merge messages"

This reverts commit 1078fb0885 (and thus
pull #5623). It has various issues:

- Pull request names get cut off at ", see e.g. a026a56

- Merge script no longer copes with pulls that have a milestone
  attached, due to a duplicate 'title' in JSON that is not handled by the
  ad-hoc parsing.
This commit is contained in:
Wladimir J. van der Laan 2015-02-20 09:54:38 +01:00
parent a026a56c4e
commit aaba10f275
No known key found for this signature in database
GPG key ID: 74810B012346C9A6

View file

@ -82,15 +82,13 @@ function cleanup() {
} }
# Create unsigned merge commit. # 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 $MERGEMESSAGE echo "Merge pull request #$PULL"
echo "" echo ""
git log --no-merges --topo-order --pretty='format:%h %s (%an)' pull/"$PULL"/base..pull/"$PULL"/head git log --no-merges --topo-order --pretty='format:%h %s (%an)' pull/"$PULL"/base..pull/"$PULL"/head
)>"$TMPDIR/message" )>"$TMPDIR/message"
if git merge -q --commit --no-edit --no-ff -m "$(<"$TMPDIR/message")" pull/"$PULL"/head; then 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)" != "d$MERGEMESSAGE" ]; then if [ "d$(git log --pretty='format:%s' -n 1)" != "dMerge pull request #$PULL" ]; then
echo "ERROR: Creating merge failed (already merged?)." >&2 echo "ERROR: Creating merge failed (already merged?)." >&2
cleanup cleanup
exit 4 exit 4