wei / pull

🤖 Keep your forks up-to-date via automated PRs

Home Page:https://github.com/apps/pull

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature request] Only merge commits from a certain timespan ago

vcup opened this issue · comments

Hello there!

I've noticed that sometimes upstream repository maintainers might use force push on their main branches. This can lead to the situation where the commits fetched by pull might be discarded by upstream later on.

To address this, I propose adding a new feature that allows users to only merge commits that have been around for a specified amount of time. For example, if the timespan is set to three days, then pull will only merge commits made three days ago or earlier. Alternatively, it might be useful to only merge commits up to HEAD~n, or, if feasible, only merge commits from the n'th most recent push by upstream.

I plan implementing this feature and would love the opportunity to submit a PR for the same.

Please let me know your thoughts on this and if you'd be open to such a contribution.

Thank you!

Thanks for the suggestion! I feel like this could be done via pull request checks. Something similar to stale where you can add a pull request check to not allow merge based on your custom rules. Pull will honor any outstanding pull request checks.