Like some others, I'm not fond of the default "Merge Pull Request" button behavior, so instead I get things in shape on the local command line, then push back to the repo. I'd like for that push to automatically resolve the original PR as "Merged."
Using the magic strings specified here (found from similar SO question here) is almost what I want. Unfortunately, including closes #123
marks the PR as "Closed", which by itself is kind of synonymous with "Rejected".
I would like to know if there is a way to trigger the same "Merged" status (w/ purple icon) that you get when you just press the button.
So far I've tried adding the following to my commit messages, to no avail:
closes #xyz
(just sets Closed status and associates)Merge pull request #123 from user/fork
(just associates)GitHub considers a PR "Merged" as soon as the commits in the PR branch are also found in the target branch (typically master
). Using a rebase
workflow, your process might look like this:
git checkout -t origin/my-pr-branch
git rebase master
git push -f origin my-pr-branch
(or just git push -f
if you've changed push.default
to something sane)master
, closing the PR: git push origin HEAD:master && git push . HEAD:master
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With