How Forgejo should integrate a pull request's commits when it is merged.
The wire value is MergePullRequestOption.Do, and it is the '''only''' required property of that request body. Modelling it as an enum rather than as a String is not decoration: the six spellings below are the complete set Forgejo accepts, a seventh comes back as a 405, and the difference between two of them is the difference between rewriting a branch's history and not. A typo in a string literal would be discovered by a production merge.
A repository can forbid any of these — allow_merge_commits, allow_rebase, allow_rebase_explicit, allow_squash_merge and allow_fast_forward_only_merge are all fields of com.worxbend.codeberg4s.repositories.wire.RepositoryDto, and golden/pull/single-open.json shows one repository with allow_fast_forward_only_merge: false and its fork with true. Asking for a style the repository forbids is a 405, not a validation error this library can catch in advance.
Record a merge that already happened outside Forgejo. Forgejo's manually-merged.
Record a merge that already happened outside Forgejo. Forgejo's manually-merged.
Changes no Git history at all: it marks the pull request merged against a commit the caller names, which is what MergePullRequest.recordingMerge supplies. Forgejo rejects the request when that commit is absent.