-
Notifications
You must be signed in to change notification settings - Fork 26
Description
As it's possible to select which kinds of methods for "merging" a PR is allowed, i.e. any/all of these:
- merge
- rebase
- squash
Thus one can run into problems such as this one (if a repo has disallowed "merge commits"):
failed to merge Pull Request https://github.com/my-org/my-repo/pull/310: PUT https://api.github.com/repos/my-org/my-repo/pulls/310/merge: 405 Merge commits are not allowed on this repository. []" repository=my-org/my-repo
Full log row:
time="2023-11-20T10:39:22Z" level=error msg="Repository update failed" error="failed to merge Pull Request https://github.com/my-org/my-repo/pull/310: failed to merge Pull Request https://github.com/my-org/my-repo/pull/310: PUT https://api.github.com/repos/my-org/my-repo/pulls/310/merge: 405 Merge commits are not allowed on this repository. []" repository=my-org/my-repo
Showing on the PR like this in the web UI:
But it's only possible to select one to try with, as per:
--pr-merge-method(string): the merge method to use. Either merge, squash, or rebase. Default to merge.-- https://dailymotion-oss.github.io/octopilot/v1.5.3/index.html#merging-pull-requests
...and in an organization with hundreds/thousands or repositories it might not be feasible to know/decide with merge method is allowed on the repos 🙈.
Hence I'd like to suggest we add either:
- a "smart/auto"
--pr-merge-method(which tries all of them, in some kind of order) --pr-merge-methodswith a list (of the ones to try, and in which order)- allow passing a list to
--pr-merge-methods(ditto)
