Open
Description
Description
data = {
"rule_name": "master,release/**",
"enable_force_push": True,
"enable_force_push_allowlist": True,
"force_push_allowlist_teams": ["General"],
"required_approvals": 1,
"priority": 10,
}
url = f"{GITEA_API_URL}/api/v1/repos/{org_name}/{repo_name}/branch_protections"
response = requests.post(url, headers=HEADERS, data=json.dumps(data))
Looking at the repo in the UI or with a GET call, enable_force_push is completely disabled.
Using the UI, this works.
Gitea Version
1.23.4
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
2.40.1
Operating System
Linux
How are you running Gitea?
Downloaded gitea from the github link.
Database
None
Activity