forked from forgejo/forgejo
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:
parent
b30d744e09
commit
21ae9838e0
16 changed files with 216 additions and 253 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue