1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-02 15:48:35 +00:00

Refactor RefName (#33234)

And fix some FIXMEs
This commit is contained in:
wxiaoguang
2025-01-13 14:01:53 +08:00
committed by GitHub
parent 81352542fd
commit 2ea929a952
13 changed files with 58 additions and 60 deletions

View File

@@ -563,9 +563,9 @@ func (n *actionsNotifier) CreateRef(ctx context.Context, pusher *user_model.User
newNotifyInput(repo, pusher, webhook_module.HookEventCreate).
WithRef(refFullName.String()).
WithPayload(&api.CreatePayload{
Ref: refFullName.String(),
Ref: refFullName.String(), // HINT: here is inconsistent with the Webhook's payload: webhook uses ShortName
Sha: refID,
RefType: refFullName.RefType(),
RefType: string(refFullName.RefType()),
Repo: apiRepo,
Sender: apiPusher,
}).
@@ -580,8 +580,8 @@ func (n *actionsNotifier) DeleteRef(ctx context.Context, pusher *user_model.User
newNotifyInput(repo, pusher, webhook_module.HookEventDelete).
WithPayload(&api.DeletePayload{
Ref: refFullName.String(),
RefType: refFullName.RefType(),
Ref: refFullName.String(), // HINT: here is inconsistent with the Webhook's payload: webhook uses ShortName
RefType: string(refFullName.RefType()),
PusherType: api.PusherTypeUser,
Repo: apiRepo,
Sender: apiPusher,