aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-05-12 21:39:02 +0800
committerGitHub <noreply@github.com>2022-05-12 21:39:02 +0800
commit368baf9e77606e5de8bbcda8b0348f1a6fba6d73 (patch)
treee6358627708f2d695fc48b4967b9c1fe803450b8 /models
parentd985dcc922892ffd2cc1af427d330f98e9dc2f80 (diff)
downloadgitea-368baf9e77606e5de8bbcda8b0348f1a6fba6d73.tar.gz
gitea-368baf9e77606e5de8bbcda8b0348f1a6fba6d73.zip
Use Vue to refactor pull merge UI (#19650)
* Use Vue to refactor pull merge UI * add comments * fix comments * small fine tune * fix tests * adopt new pull default messages * clean up Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'models')
-rw-r--r--models/repo/repo_unit.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/models/repo/repo_unit.go b/models/repo/repo_unit.go
index 0f6b41933d..de79eb1c9f 100644
--- a/models/repo/repo_unit.go
+++ b/models/repo/repo_unit.go
@@ -150,24 +150,6 @@ func (cfg *PullRequestsConfig) GetDefaultMergeStyle() MergeStyle {
return MergeStyleMerge
}
-// AllowedMergeStyleCount returns the total count of allowed merge styles for the PullRequestsConfig
-func (cfg *PullRequestsConfig) AllowedMergeStyleCount() int {
- count := 0
- if cfg.AllowMerge {
- count++
- }
- if cfg.AllowRebase {
- count++
- }
- if cfg.AllowRebaseMerge {
- count++
- }
- if cfg.AllowSquash {
- count++
- }
- return count
-}
-
// BeforeSet is invoked from XORM before setting the value of a field of this object.
func (r *RepoUnit) BeforeSet(colName string, val xorm.Cell) {
switch colName {