mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Move repofiles webhooks to notification (#8807)
This commit is contained in:
parent
36b8c081f6
commit
8a84d82d53
5 changed files with 77 additions and 68 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue