mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 01:34:27 +00:00 
			
		
		
		
	Backport #20655 Fix #20654 Co-authored-by: Gabriel Vasile <gabriel.vasile@email.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
		@@ -21,6 +21,11 @@ func GenerateIssueLabels(ctx context.Context, templateRepo, generateRepo *repo_m
 | 
				
			|||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return err
 | 
							return err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						// Prevent insert being called with an empty slice which would result in
 | 
				
			||||||
 | 
						// err "no element on slice when insert".
 | 
				
			||||||
 | 
						if len(templateLabels) == 0 {
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	newLabels := make([]*issues_model.Label, 0, len(templateLabels))
 | 
						newLabels := make([]*issues_model.Label, 0, len(templateLabels))
 | 
				
			||||||
	for _, templateLabel := range templateLabels {
 | 
						for _, templateLabel := range templateLabels {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user