mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	#1597 support pull requests in same repository
This commit is contained in:
		@@ -184,6 +184,11 @@ type Repository struct {
 | 
			
		||||
 | 
			
		||||
func (repo *Repository) AfterSet(colName string, _ xorm.Cell) {
 | 
			
		||||
	switch colName {
 | 
			
		||||
	case "default_branch":
 | 
			
		||||
		// FIXME: use models migration to solve all at once.
 | 
			
		||||
		if len(repo.DefaultBranch) == 0 {
 | 
			
		||||
			repo.DefaultBranch = "master"
 | 
			
		||||
		}
 | 
			
		||||
	case "num_closed_issues":
 | 
			
		||||
		repo.NumOpenIssues = repo.NumIssues - repo.NumClosedIssues
 | 
			
		||||
	case "num_closed_pulls":
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user