|
1371 | 1371 | }
|
1372 | 1372 | }
|
1373 | 1373 | },
|
| 1374 | + "/repos/{owner}/{repo}/branches/{branch}/protection": { |
| 1375 | + "get": { |
| 1376 | + "produces": [ |
| 1377 | + "application/json" |
| 1378 | + ], |
| 1379 | + "tags": [ |
| 1380 | + "repository" |
| 1381 | + ], |
| 1382 | + "summary": "Retrieve a specific branch protection from a repository", |
| 1383 | + "operationId": "repoGetBranchProtection", |
| 1384 | + "parameters": [ |
| 1385 | + { |
| 1386 | + "type": "string", |
| 1387 | + "description": "owner of the repo", |
| 1388 | + "name": "owner", |
| 1389 | + "in": "path", |
| 1390 | + "required": true |
| 1391 | + }, |
| 1392 | + { |
| 1393 | + "type": "string", |
| 1394 | + "description": "name of the repo", |
| 1395 | + "name": "repo", |
| 1396 | + "in": "path", |
| 1397 | + "required": true |
| 1398 | + }, |
| 1399 | + { |
| 1400 | + "type": "string", |
| 1401 | + "description": "branch to get", |
| 1402 | + "name": "branch", |
| 1403 | + "in": "path", |
| 1404 | + "required": true |
| 1405 | + } |
| 1406 | + ], |
| 1407 | + "responses": { |
| 1408 | + "200": { |
| 1409 | + "$ref": "#/responses/Branch" |
| 1410 | + } |
| 1411 | + } |
| 1412 | + }, |
| 1413 | + "put": { |
| 1414 | + "produces": [ |
| 1415 | + "application/json" |
| 1416 | + ], |
| 1417 | + "tags": [ |
| 1418 | + "repository" |
| 1419 | + ], |
| 1420 | + "summary": "Update branch protection of a repository", |
| 1421 | + "operationId": "repoUpdateProtectBranch", |
| 1422 | + "parameters": [ |
| 1423 | + { |
| 1424 | + "type": "string", |
| 1425 | + "description": "owner of the repo", |
| 1426 | + "name": "owner", |
| 1427 | + "in": "path", |
| 1428 | + "required": true |
| 1429 | + }, |
| 1430 | + { |
| 1431 | + "type": "string", |
| 1432 | + "description": "name of the repo", |
| 1433 | + "name": "repo", |
| 1434 | + "in": "path", |
| 1435 | + "required": true |
| 1436 | + }, |
| 1437 | + { |
| 1438 | + "type": "string", |
| 1439 | + "description": "branch to update", |
| 1440 | + "name": "branch", |
| 1441 | + "in": "path", |
| 1442 | + "required": true |
| 1443 | + }, |
| 1444 | + { |
| 1445 | + "name": "body", |
| 1446 | + "in": "body", |
| 1447 | + "required": true, |
| 1448 | + "schema": { |
| 1449 | + "$ref": "#/definitions/ProtectBranchForm" |
| 1450 | + } |
| 1451 | + } |
| 1452 | + ], |
| 1453 | + "responses": { |
| 1454 | + "200": { |
| 1455 | + "$ref": "#/responses/Branch" |
| 1456 | + } |
| 1457 | + } |
| 1458 | + }, |
| 1459 | + "delete": { |
| 1460 | + "produces": [ |
| 1461 | + "application/json" |
| 1462 | + ], |
| 1463 | + "tags": [ |
| 1464 | + "repository" |
| 1465 | + ], |
| 1466 | + "summary": "Remove branch protection from a repository", |
| 1467 | + "operationId": "repoDeleteProtectedBranch", |
| 1468 | + "parameters": [ |
| 1469 | + { |
| 1470 | + "type": "string", |
| 1471 | + "description": "owner of the repo", |
| 1472 | + "name": "owner", |
| 1473 | + "in": "path", |
| 1474 | + "required": true |
| 1475 | + }, |
| 1476 | + { |
| 1477 | + "type": "string", |
| 1478 | + "description": "name of the repo", |
| 1479 | + "name": "repo", |
| 1480 | + "in": "path", |
| 1481 | + "required": true |
| 1482 | + }, |
| 1483 | + { |
| 1484 | + "type": "string", |
| 1485 | + "description": "branch to remove protection", |
| 1486 | + "name": "branch", |
| 1487 | + "in": "path", |
| 1488 | + "required": true |
| 1489 | + } |
| 1490 | + ], |
| 1491 | + "responses": { |
| 1492 | + "204": { |
| 1493 | + "$ref": "#/responses/empty" |
| 1494 | + } |
| 1495 | + } |
| 1496 | + } |
| 1497 | + }, |
1374 | 1498 | "/repos/{owner}/{repo}/collaborators": {
|
1375 | 1499 | "get": {
|
1376 | 1500 | "produces": [
|
|
6941 | 7065 | "name": {
|
6942 | 7066 | "type": "string",
|
6943 | 7067 | "x-go-name": "Name"
|
| 7068 | + }, |
| 7069 | + "protected": { |
| 7070 | + "type": "boolean", |
| 7071 | + "x-go-name": "Protected" |
6944 | 7072 | }
|
6945 | 7073 | },
|
6946 | 7074 | "x-go-package": "code.gitea.io/gitea/modules/structs"
|
|
9115 | 9243 | },
|
9116 | 9244 | "x-go-package": "code.gitea.io/gitea/modules/structs"
|
9117 | 9245 | },
|
| 9246 | + "ProtectBranchForm": { |
| 9247 | + "description": "ProtectBranchForm form for changing protected branch settings", |
| 9248 | + "type": "object", |
| 9249 | + "properties": { |
| 9250 | + "ApprovalsWhitelistTeams": { |
| 9251 | + "type": "string" |
| 9252 | + }, |
| 9253 | + "ApprovalsWhitelistUsers": { |
| 9254 | + "type": "string" |
| 9255 | + }, |
| 9256 | + "EnableMergeWhitelist": { |
| 9257 | + "type": "boolean" |
| 9258 | + }, |
| 9259 | + "EnableWhitelist": { |
| 9260 | + "type": "boolean" |
| 9261 | + }, |
| 9262 | + "MergeWhitelistTeams": { |
| 9263 | + "type": "string" |
| 9264 | + }, |
| 9265 | + "MergeWhitelistUsers": { |
| 9266 | + "type": "string" |
| 9267 | + }, |
| 9268 | + "Protected": { |
| 9269 | + "type": "boolean" |
| 9270 | + }, |
| 9271 | + "RequiredApprovals": { |
| 9272 | + "type": "integer", |
| 9273 | + "format": "int64" |
| 9274 | + }, |
| 9275 | + "WhitelistTeams": { |
| 9276 | + "type": "string" |
| 9277 | + }, |
| 9278 | + "WhitelistUsers": { |
| 9279 | + "type": "string" |
| 9280 | + } |
| 9281 | + }, |
| 9282 | + "x-go-package": "code.gitea.io/gitea/modules/auth" |
| 9283 | + }, |
9118 | 9284 | "PublicKey": {
|
9119 | 9285 | "description": "PublicKey publickey is a user key to push code to repository",
|
9120 | 9286 | "type": "object",
|
|
0 commit comments