Closed
Description
Description
I'm trying to use the API to programmatically update the default_merge_style to 'rebase'.
The HTTP PATCH looks rather simple, I'm doing something like this from python:
When enabling the HTTPConnection.debuglevel of the python client, I get:
send: b'PATCH /api/v1/repos/laforge/3gpp-etsi-pdf-links HTTP/1.1\r\nHost: gitea.osmocom.org\r\nUser-Agent: python-requests/2.27.1\r\nAccept-Encoding: gzip, deflate, br\r\nAccept: */*\r\nConnection: keep-alive\r\nCookie: _csrf=rSUK77i1f32Y-foobar; i_like_gitea=foobar\r\nContent-Length: 33\r\nContent-Type: application/json\r\nAuthorization: token foobar\r\n\r\n'
send: b'{"default_merge_style": "rebase"}'
reply: 'HTTP/1.1 200 OK\r\n'
So what's odd here is
- the PATCH body definitely contains the
{"default_merge_style": "rebase"}
- the HTTP status code is 200
- the change is not visible afterwards, not via the web UI
- the JSON returned in the response again states
{"default_merge_style": "merge"}
- which was the setting before issuing the patch.
The same problem is also observed when trying to change the allow_squash_merge
in a similar PATCH
Gitea Version
1.16.8
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
Debian GNU/Linux 11
How are you running Gitea?
gitea docker container
Database
SQLite