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>
This commit is contained in:
parent
d985dcc922
commit
368baf9e77
7 changed files with 206 additions and 218 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue