mirror of
https://github.com/go-gitea/gitea
synced 2025-07-16 07:18:37 +00:00
Move mirror sync actions to notification (#9022)
* Move mirror sync actions to notification * fix lint
This commit is contained in:
committed by
techknowlogick
parent
e3f22ad2cc
commit
8ab35eefc4
@@ -227,3 +227,24 @@ func NotifyDeleteRef(pusher *models.User, repo *models.Repository, refType, refF
|
||||
notifier.NotifyDeleteRef(pusher, repo, refType, refFullName)
|
||||
}
|
||||
}
|
||||
|
||||
// NotifySyncPushCommits notifies commits pushed to notifiers
|
||||
func NotifySyncPushCommits(pusher *models.User, repo *models.Repository, refName, oldCommitID, newCommitID string, commits *models.PushCommits) {
|
||||
for _, notifier := range notifiers {
|
||||
notifier.NotifySyncPushCommits(pusher, repo, refName, oldCommitID, newCommitID, commits)
|
||||
}
|
||||
}
|
||||
|
||||
// NotifySyncCreateRef notifies branch or tag creation to notifiers
|
||||
func NotifySyncCreateRef(pusher *models.User, repo *models.Repository, refType, refFullName string) {
|
||||
for _, notifier := range notifiers {
|
||||
notifier.NotifySyncCreateRef(pusher, repo, refType, refFullName)
|
||||
}
|
||||
}
|
||||
|
||||
// NotifySyncDeleteRef notifies branch or tag deletion to notifiers
|
||||
func NotifySyncDeleteRef(pusher *models.User, repo *models.Repository, refType, refFullName string) {
|
||||
for _, notifier := range notifiers {
|
||||
notifier.NotifySyncDeleteRef(pusher, repo, refType, refFullName)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user