mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	#2505 Allow to fork and disallow to create PRs for mirrors.
This commit is contained in:
		@@ -332,7 +332,17 @@ func (repo *Repository) IsOwnedBy(userID int64) bool {
 | 
			
		||||
 | 
			
		||||
// CanBeForked returns true if repository meets the requirements of being forked.
 | 
			
		||||
func (repo *Repository) CanBeForked() bool {
 | 
			
		||||
	return !repo.IsBare && !repo.IsMirror
 | 
			
		||||
	return !repo.IsBare
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// CanEnablePulls returns true if repository meets the requirements of accepting pulls.
 | 
			
		||||
func (repo *Repository) CanEnablePulls() bool {
 | 
			
		||||
	return !repo.IsMirror
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// AllowPulls returns true if repository meets the requirements of accepting pulls and has them enabled.
 | 
			
		||||
func (repo *Repository) AllowsPulls() bool {
 | 
			
		||||
	return repo.CanEnablePulls() && repo.EnablePulls;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (repo *Repository) NextIssueIndex() int64 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user