Fix bug of branches API with tests (#25578)

Fix #25558
Extract from #22743

This PR added a repository's check when creating/deleting branches via
API. Mirror repository and archive repository cannot do that.
此提交包含在:
Lunny Xiao
2023-07-01 10:52:52 +08:00
提交者 GitHub
父節點 1704c64a15
當前提交 de981c39e6
共有 26 個檔案被更改,包括 258 行新增4 行删除
+3
查看文件
@@ -3606,6 +3606,9 @@
"201": {
"$ref": "#/responses/Branch"
},
"403": {
"description": "The branch is archived or a mirror."
},
"404": {
"description": "The old branch does not exist."
},