mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-25 11:16:11 +01:00
This reverts commit 6034f8bcaa
.
This commit is contained in:
parent
e9dc3bcb79
commit
8d212f778c
|
@ -249,12 +249,12 @@ func CommitRepoAction(optsList ...*CommitRepoActionOptions) error {
|
|||
IsPrivate: repo.IsPrivate,
|
||||
}
|
||||
|
||||
var isHookEventPush = true
|
||||
switch opType {
|
||||
case models.ActionCommitRepo: // Push
|
||||
if opts.IsNewBranch() {
|
||||
notification.NotifyCreateRef(pusher, repo, "branch", opts.RefFullName)
|
||||
}
|
||||
notification.NotifyPushCommits(pusher, repo, opts.RefFullName, opts.OldCommitID, opts.NewCommitID, opts.Commits)
|
||||
case models.ActionDeleteBranch: // Delete Branch
|
||||
notification.NotifyDeleteRef(pusher, repo, "branch", opts.RefFullName)
|
||||
|
||||
|
@ -263,6 +263,12 @@ func CommitRepoAction(optsList ...*CommitRepoActionOptions) error {
|
|||
|
||||
case models.ActionDeleteTag: // Delete Tag
|
||||
notification.NotifyDeleteRef(pusher, repo, "tag", opts.RefFullName)
|
||||
default:
|
||||
isHookEventPush = false
|
||||
}
|
||||
|
||||
if isHookEventPush {
|
||||
notification.NotifyPushCommits(pusher, repo, opts.RefFullName, opts.OldCommitID, opts.NewCommitID, opts.Commits)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue