Skip to content

Setting allow_* options for repo not possible via API #21591

Closed
@adamel

Description

@adamel

Description

When trying to change any of the allow_* options it does not have any effect. Changing for example external_tracker and has_issues settings work fine.

$ curl -s -X 'PATCH' "https://server/gitea/api/v1/repos/${org}/${repo}?access_token=${token}" \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{ "allow_merge_commits": false, "allow_rebase": false, "allow_rebase_explicit": false, "allow_squash_merge": false }' | jq | grep allow
  "allow_merge_commits": true,
  "allow_rebase": true,
  "allow_rebase_explicit": true,
  "allow_squash_merge": true,
$

Can not try to reproduce on demo site as it does not allow API access.

Gitea Version

1.17.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.31.1-2.el9.2

Operating System

AlmaLinux 9

How are you running Gitea?

Binary distribution, running directly from command line.

Database

MySQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions