sympy / sympy-bot

GitHub bot for SymPy
https://github.com/sympy-bot
Other
22 stars 11 forks source link

Auto-merge on green #36

Open asmeurer opened 5 years ago

asmeurer commented 5 years ago

Another thing the bot could be used for is to allow someone to tag a PR to be automatically merged as soon as it goes green. That way if they don't have to wait for Travis. For instance, they could add a label "automerge when tests pass" and it would do so.

I'm not exactly sure how to do it. I think there are probably events for the tests passing, but we need to make sure that we only do it if the tests pass on the most recent commit when the label was added. Otherwise the label should become invalid. I don't know if we can check the order. If not, we could make the bot automatically remove that label from any PR as soon as a commit is pushed. We could also check for comments like "do not merge".

certik commented 5 years ago

That's why I like GitLab, where this is already implemented. And if it wasn't, then we can implement it in GitLab itself, because it is open source. So in the long run, I think that is the way to go, rather than depend on a proprietary solution like GitHub.

But for now, I don't suggest to move SymPy over yet.

asmeurer commented 5 years ago

I suspect GitHub will eventually implement it. Maybe we should just wait for it to happen. I'll have to see how difficult this is to actually implement using the bot.

certik commented 5 years ago

I think so. GitHub has been implementing things from GitLab, like issue boards, or creating a link to open up a pull request when you push to a branch.

asmeurer commented 5 years ago

Also if GitHub did implement it it would be better than what we could get from the bot, because the committer on the merge commit would be the person who clicked the button rather than the @sympy-bot user.