mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Updates to the API for archived repos (#27149)
This commit is contained in:
		@@ -25,6 +25,16 @@ import (
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func createTag(ctx context.Context, gitRepo *git.Repository, rel *repo_model.Release, msg string) (bool, error) {
 | 
			
		||||
	err := rel.LoadAttributes(ctx)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return false, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	err = rel.Repo.MustNotBeArchived()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return false, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var created bool
 | 
			
		||||
	// Only actual create when publish.
 | 
			
		||||
	if !rel.IsDraft {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user