I love GitHub's Merge Button™... except that it creates a commit with my personal email address even on my work projects. (Or, conversely, that is uses my work email on my personal projects.)
My solution is to create a git-merge-button
and add it to my path:
#!/bin/bash
if [ $# -ne 2 ]; then
echo "Usage: git merge-and-clean-up [branch-name] [pull number]"
exit 1
fi
git co $1 &&\
git pr &&\
git co master &&\
git pr &&\
git merge --no-ff $1 -m "Merge branch '$1'"$'\n'$'\n'"Closes #$2" &&\
git push &&\
git branch -d $1 &&\
git push origin ":$1"
When I open pull request 124 for branch "my-branch" and by some miracle it gets a +1, then I just run
$ git merge-button my-branch 124
and I get a merge commit with the right email address that closes the pull request and deletes the relevant branches.