1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-13 14:07:20 +00:00

Move repofiles webhooks to notification (#8807)

This commit is contained in:
Lunny Xiao
2019-11-06 14:43:03 +08:00
committed by GitHub
parent 36b8c081f6
commit 8a84d82d53
5 changed files with 77 additions and 68 deletions

View File

@ -199,3 +199,17 @@ func NotifyPushCommits(pusher *models.User, repo *models.Repository, refName, ol
notifier.NotifyPushCommits(pusher, repo, refName, oldCommitID, newCommitID, commits)
}
}
// NotifyCreateRef notifies branch or tag creation to notifiers
func NotifyCreateRef(pusher *models.User, repo *models.Repository, refType, refFullName string) {
for _, notifier := range notifiers {
notifier.NotifyCreateRef(pusher, repo, refType, refFullName)
}
}
// NotifyDeleteRef notifies branch or tag deletion to notifiers
func NotifyDeleteRef(pusher *models.User, repo *models.Repository, refType, refFullName string) {
for _, notifier := range notifiers {
notifier.NotifyDeleteRef(pusher, repo, refType, refFullName)
}
}