aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-07-03 22:17:30 +0800
committerGitHub <noreply@github.com>2023-07-03 16:17:30 +0200
commit13ffa287b1a2edd788fa21cfef447766dbd77821 (patch)
tree65e4afcb9f004e4e383ab37ae7e3de7243d8db1d /models
parente5b684e567410e341d798753f564bdd438198a9b (diff)
downloadgitea-13ffa287b1a2edd788fa21cfef447766dbd77821.tar.gz
gitea-13ffa287b1a2edd788fa21cfef447766dbd77821.zip
Fix bug of branches API with tests(#25578) (#25579)
Backport #25578 This PR added a repository's check when creating/deleting branches via API. Mirror repository and archive repository cannot do that.
Diffstat (limited to 'models')
-rw-r--r--models/fixtures/mirror.yml49
-rw-r--r--models/fixtures/repository.yml2
2 files changed, 50 insertions, 1 deletions
diff --git a/models/fixtures/mirror.yml b/models/fixtures/mirror.yml
new file mode 100644
index 0000000000..97bc4ae60d
--- /dev/null
+++ b/models/fixtures/mirror.yml
@@ -0,0 +1,49 @@
+-
+ id: 1
+ repo_id: 5
+ interval: 3600
+ enable_prune: false
+ updated_unix: 0
+ next_update_unix: 0
+ lfs_enabled: false
+ lfs_endpoint: ""
+
+-
+ id: 2
+ repo_id: 25
+ interval: 3600
+ enable_prune: false
+ updated_unix: 0
+ next_update_unix: 0
+ lfs_enabled: false
+ lfs_endpoint: ""
+
+-
+ id: 3
+ repo_id: 26
+ interval: 3600
+ enable_prune: false
+ updated_unix: 0
+ next_update_unix: 0
+ lfs_enabled: false
+ lfs_endpoint: ""
+
+-
+ id: 4
+ repo_id: 27
+ interval: 3600
+ enable_prune: false
+ updated_unix: 0
+ next_update_unix: 0
+ lfs_enabled: false
+ lfs_endpoint: ""
+
+-
+ id: 5
+ repo_id: 28
+ interval: 3600
+ enable_prune: false
+ updated_unix: 0
+ next_update_unix: 0
+ lfs_enabled: false
+ lfs_endpoint: ""
diff --git a/models/fixtures/repository.yml b/models/fixtures/repository.yml
index ef7730780f..050a9e2d06 100644
--- a/models/fixtures/repository.yml
+++ b/models/fixtures/repository.yml
@@ -141,7 +141,7 @@
num_projects: 0
num_closed_projects: 0
is_private: true
- is_empty: true
+ is_empty: false
is_archived: false
is_mirror: true
status: 0