mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Move transfer repository and rename repository on a service package and start action notification (#8573)
* move transfer repository and rename repository on a service package and start action notification * remove unused codes * fix lint * fix bugs * fix test * fix test * fix test * fix lint * update go mod and sum
This commit is contained in:
		| @@ -101,27 +101,6 @@ func NotifyDeleteComment(doer *models.User, c *models.Comment) { | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // NotifyDeleteRepository notifies delete repository to notifiers | ||||
| func NotifyDeleteRepository(doer *models.User, repo *models.Repository) { | ||||
| 	for _, notifier := range notifiers { | ||||
| 		notifier.NotifyDeleteRepository(doer, repo) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // NotifyForkRepository notifies fork repository to notifiers | ||||
| func NotifyForkRepository(doer *models.User, oldRepo, repo *models.Repository) { | ||||
| 	for _, notifier := range notifiers { | ||||
| 		notifier.NotifyForkRepository(doer, oldRepo, repo) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // NotifyRenameRepository notifies repository renamed | ||||
| func NotifyRenameRepository(doer *models.User, repo *models.Repository, oldName string) { | ||||
| 	for _, notifier := range notifiers { | ||||
| 		notifier.NotifyRenameRepository(doer, repo, oldName) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // NotifyNewRelease notifies new release to notifiers | ||||
| func NotifyNewRelease(rel *models.Release) { | ||||
| 	for _, notifier := range notifiers { | ||||
| @@ -200,6 +179,34 @@ func NotifyMigrateRepository(doer *models.User, u *models.User, repo *models.Rep | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // NotifyTransferRepository notifies create repository to notifiers | ||||
| func NotifyTransferRepository(doer *models.User, repo *models.Repository, newOwnerName string) { | ||||
| 	for _, notifier := range notifiers { | ||||
| 		notifier.NotifyTransferRepository(doer, repo, newOwnerName) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // NotifyDeleteRepository notifies delete repository to notifiers | ||||
| func NotifyDeleteRepository(doer *models.User, repo *models.Repository) { | ||||
| 	for _, notifier := range notifiers { | ||||
| 		notifier.NotifyDeleteRepository(doer, repo) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // NotifyForkRepository notifies fork repository to notifiers | ||||
| func NotifyForkRepository(doer *models.User, oldRepo, repo *models.Repository) { | ||||
| 	for _, notifier := range notifiers { | ||||
| 		notifier.NotifyForkRepository(doer, oldRepo, repo) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // NotifyRenameRepository notifies repository renamed | ||||
| func NotifyRenameRepository(doer *models.User, repo *models.Repository, oldName string) { | ||||
| 	for _, notifier := range notifiers { | ||||
| 		notifier.NotifyRenameRepository(doer, repo, oldName) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // NotifyPushCommits notifies commits pushed to notifiers | ||||
| func NotifyPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *models.PushCommits) { | ||||
| 	for _, notifier := range notifiers { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user