The Wayback Machine - https://web.archive.org/web/20220507124557/https://github.com/go-gitea/gitea/issues/18773
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing Repositories via API ignores default_merge_style #18773

Open
rtpt-jonaslieb opened this issue Feb 15, 2022 · 1 comment
Open

Editing Repositories via API ignores default_merge_style #18773

rtpt-jonaslieb opened this issue Feb 15, 2022 · 1 comment

Comments

@rtpt-jonaslieb
Copy link

@rtpt-jonaslieb rtpt-jonaslieb commented Feb 15, 2022

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

@noerw
Copy link

@noerw noerw commented Mar 22, 2022

I'm pretty sure has the same cause as described in #19069 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants