4

Not a real question, rather a suggestion if anyone has faced the same needs.

Suppose to have a github repository with many contributors making PR. What are the best tools to automatic merge PR with the following condition:

  • in there is no activity for a while (e.g. 10 days) close the PR without merging it IF the author has NOT commit rights on the repo and merge it IF the author has commit rights

I found several useful tool, like github APP:

  • bulldozer that merges PR based on conditions (but not time intervals)
  • policy-bot that tags the PR as approved/not approved depending on some conditions
  • mergify that auto merges PR depending on different conditions (again, no time intervals)
  • writing a webhook?

In some ways I think that a synergy between APPs and other tools can solve the problem, but maybe there is a smoother way to do this.

Someone has some suggestions?

2 Answers 2

1

In some ways I think that a synergy between APPs and other tools can solve the problem

As other tools, don't forget GitHub Actions, like (for those regarding PR):

By looking at their implementation, you can make your own which will close a PR matching your criteria.

1
  • The question was not really about "closing stale PR" (which I personally find one of the most useless things ever), but about having some complex logic there... Not to mention that one doesn't want to use GH Actions if they have some CI up and running already. Commented Aug 3, 2021 at 6:26
0

Jenkins can be used for this exact thing and more, and it doesn't necessarily need to be a GitHub repository, any git repo works the same.

For example, in my company we use it to scan BitBucket PR comments and perform complex commands according to the comments, allowing for validations, automation testing and more before performing potentially dangerous actions.

Jenkins can be easily integrated with your git repo, or also with GitHub.

https://plugins.jenkins.io/github/

https://plugins.jenkins.io/git/

2
  • It sounds like "implement it yourself" answer... While for sure it works, I think the idea of the question was to reuse some of existing well-known tools and merge bots for this and do not reinvent the wheel... Commented Aug 6, 2021 at 6:06
  • The question was about ways to achieve this goal. Obviously, if you're short on time/lazy/prefer to use a well supported implementation then a do-it-yourself solution is not for you.
    – Mor Blau
    Commented Aug 8, 2021 at 7:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.