aboutsummaryrefslogtreecommitdiffstats
path: root/services/webhook
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-06-13 14:05:28 +0800
committerGitHub <noreply@github.com>2023-06-13 06:05:28 +0000
commit419804fd4d5cb655a51f245010b8eb1163b26bc2 (patch)
treed60bd3e695e11acf6b60e7a6be224989514426a1 /services/webhook
parent2126f712bfc0ea63705e54abbd14aec54299fa50 (diff)
downloadgitea-419804fd4d5cb655a51f245010b8eb1163b26bc2.tar.gz
gitea-419804fd4d5cb655a51f245010b8eb1163b26bc2.zip
Fix compatible for webhook ref type (#25195)
Fix #25185 Caused by #24634
Diffstat (limited to 'services/webhook')
-rw-r--r--services/webhook/notifier.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/webhook/notifier.go b/services/webhook/notifier.go
index e6d1875b29..bccd477852 100644
--- a/services/webhook/notifier.go
+++ b/services/webhook/notifier.go
@@ -755,7 +755,7 @@ func (m *webhookNotifier) NotifyCreateRef(ctx context.Context, pusher *user_mode
if err := PrepareWebhooks(ctx, EventSource{Repository: repo}, webhook_module.HookEventCreate, &api.CreatePayload{
Ref: refName, // FIXME: should it be a full ref name?
Sha: refID,
- RefType: refFullName.RefGroup(),
+ RefType: refFullName.RefType(),
Repo: apiRepo,
Sender: apiPusher,
}); err != nil {
@@ -791,12 +791,12 @@ func (m *webhookNotifier) NotifyDeleteRef(ctx context.Context, pusher *user_mode
if err := PrepareWebhooks(ctx, EventSource{Repository: repo}, webhook_module.HookEventDelete, &api.DeletePayload{
Ref: refName, // FIXME: should it be a full ref name?
- RefType: refFullName.RefGroup(),
+ RefType: refFullName.RefType(),
PusherType: api.PusherTypeUser,
Repo: apiRepo,
Sender: apiPusher,
}); err != nil {
- log.Error("PrepareWebhooks.(delete %s): %v", refFullName.RefGroup(), err)
+ log.Error("PrepareWebhooks.(delete %s): %v", refFullName.RefType(), err)
}
}