问题
We want to automatically merge out from master to another long-lived branch whenever any changes are committed to master (at the moment, this is a manual process and people forget)
I appreciate that it may not always be possible, owing to merge conflicts, but if it is possible, we'd like it to happen automatically.
Is this possible?
回答1:
Is available since 2020-12-16
The native GitHub Auto-Merge was introduced on GitHub Universe 2 days ago.
How to active them? Go to Settings of your repository, e.g. https://github.com/rectorphp/rector/settings, then ↓
Tip: do you want to prevent merged branch piling up? Enable autobranch removal too
Source
While it might not be solely what you need to you for your use case, it can be used with GitHub Actions to get there more easily.
回答2:
I've been using https://github.com/marketplace/actions/merge-pull-requests for a while and it works pretty well. In that page you have the instructions on how to use it.
If you need more specific workflows, you can try https://mergify.io/ also.
来源:https://stackoverflow.com/questions/35445186/can-github-automatically-merge-branches