mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Fix compatible for webhook ref type (#25195)
Fix #25185 Caused by #24634
This commit is contained in:
parent
2126f712bf
commit
419804fd4d
4 changed files with 21 additions and 7 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue