Closed
Description
- Gitea version (or commit ref):
- Gitea Version: 1.13.0+rc2
- Git version:
- 2.26.2
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- OS: Linux / Docker Container.
I have created a repository within an organisation and afterwards I've tried to change the settings of that repository.
This change is being done via REST API. In particular I'm trying to change the entries:
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
Example from within IDEA IntelliJ:
PATCH https://try.gitea.io/api/v1/repos/khmtestorga/testrepo
Authorization: Basic khmarbaise PASSWORD
accept: application/json
Content-Type: application/json
{
"allow_merge_commits": false,
"allow_rebase": false,
"allow_rebase_explicit": false,
"allow_squash_merge": false,
"archived": false,
"default_branch": "master"
}
The answer I got from the request:
PATCH https://try.gitea.io/api/v1/repos/khmtestorga/testrepo
HTTP/1.1 200 OK
Content-Length: 1294
Content-Type: application/json; charset=UTF-8
Date: Wed, 18 Nov 2020 15:59:33 GMT
Set-Cookie: lang=en-US; Path=/; Max-Age=2147483647
Set-Cookie: i_like_gitea=d98defc8aa9674ca; Path=/; HttpOnly
Set-Cookie: _csrf=vSQjaJTg6nzcl5Lqkh4bLjFaoJI6MTYwNTcxNTE3Mjg2NTg1NDgyNg; Path=/; Expires=Thu, 19 Nov 2020 15:59:32 GMT; HttpOnly
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
{
"id": 21480,
"owner": {
"id": 42394,
"login": "khmtestorga",
"full_name": "",
"email": "",
"avatar_url": "https://try.gitea.io/user/avatar/khmtestorga/-1",
"language": "",
"is_admin": false,
"last_login": "1970-01-01T00:00:00Z",
"created": "2020-11-18T15:57:08Z",
"username": "khmtestorga"
},
"name": "testrepo",
"full_name": "khmtestorga/testrepo",
"description": "",
"empty": true,
"private": false,
"fork": false,
"template": false,
"parent": null,
"mirror": false,
"size": 17,
"html_url": "https://try.gitea.io/khmtestorga/testrepo",
"ssh_url": "[email protected]:khmtestorga/testrepo.git",
"clone_url": "https://try.gitea.io/khmtestorga/testrepo.git",
"original_url": "",
"website": "",
"stars_count": 0,
"forks_count": 0,
"watchers_count": 1,
"open_issues_count": 0,
"open_pr_counter": 0,
"release_counter": 0,
"default_branch": "master",
"archived": false,
"created_at": "2020-11-18T15:57:37Z",
"updated_at": "2020-11-18T15:59:33Z",
"permissions": {
"admin": true,
"push": true,
"pull": true
},
"has_issues": true,
"internal_tracker": {
"enable_time_tracker": true,
"allow_only_contributors_to_track_time": true,
"enable_issue_dependencies": true
},
"has_wiki": true,
"has_pull_requests": true,
"has_projects": true,
"ignore_whitespace_conflicts": false,
"allow_merge_commits": true,
"allow_rebase": true,
"allow_rebase_explicit": true,
"allow_squash_merge": true,
"avatar_url": "",
"internal": false
}
Response code: 200 (OK); Time: 967ms; Content length: 1294 bytes
So as you can see that the entries: allow_merge_commits
, allow_rebase
, allow_rebase_explicit
and allow_squash_merge
have not been changed at all.
Desription
The question is if I'm doing the change at the correct API endpoint or do I need to use a different one...