mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 03:18:24 +00:00 
			
		
		
		
	Send tag create and push webhook when release created on UI (#8671)
* 'update' * Send push tag event when release created * send tag create event while release created in UI * update to go v1.13 * fix gofmt error * update #8671 move release tag created hook to modules/notification/webhook due to #8802 refactoring * use NotifyCreateRef and NotifyPushCommits instead of NotifyNewReleaseTag * move tag notification to correct place
This commit is contained in:
		| @@ -37,6 +37,15 @@ func createTag(gitRepo *git.Repository, rel *models.Release) error { | |||||||
| 				return err | 				return err | ||||||
| 			} | 			} | ||||||
| 			rel.LowerTagName = strings.ToLower(rel.TagName) | 			rel.LowerTagName = strings.ToLower(rel.TagName) | ||||||
|  | 			// Prepare Notify | ||||||
|  | 			if err := rel.LoadAttributes(); err != nil { | ||||||
|  | 				log.Error("LoadAttributes: %v", err) | ||||||
|  | 				return err | ||||||
|  | 			} | ||||||
|  | 			notification.NotifyPushCommits( | ||||||
|  | 				rel.Publisher, rel.Repo, git.TagPrefix+rel.TagName, | ||||||
|  | 				git.EmptySHA, commit.ID.String(), models.NewPushCommits()) | ||||||
|  | 			notification.NotifyCreateRef(rel.Publisher, rel.Repo, "tag", git.TagPrefix+rel.TagName) | ||||||
| 		} | 		} | ||||||
| 		commit, err := gitRepo.GetTagCommit(rel.TagName) | 		commit, err := gitRepo.GetTagCommit(rel.TagName) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user