Closed

Description
Gitea Version
1.16.1
Git Version
No response
Operating System
No response
How are you running Gitea?
Using the Linux x64 binaries from the releases page.
Database
No response
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Description
When editing repos via the API, the value of default_merge_style
is ignored.
Querying the API with curl/jq before the change:
$ export GITEA_ACCESS_TOKEN=[...]
$ curl -s -H "Authorization: token $GITEA_ACCESS_TOKEN" https://try.gitea.io/api/v1/repos/7CLfteiIYWtD/test | jq .default_merge_style
"merge"
Trying to change the setting via the API:
$ curl -s -H "Authorization: token $GITEA_ACCESS_TOKEN" -X PATCH -H 'Content-Type: application/json' -d '{"default_merge_style": "rebase"}' https://try.gitea.io/api/v1/repos/7CLfteiIYWtD/test | jq .default_merge_style
"merge"
This should have returned "rebase"
.
After changing the default merge style through the UI:
$ curl -s -H "Authorization: token $GITEA_ACCESS_TOKEN" https://try.gitea.io/api/v1/repos/7CLfteiIYWtD/test | jq .default_merge_style
"rebase"
Screenshots
No response