mirror of
https://github.com/go-gitea/gitea
synced 2025-08-12 20:48:20 +00:00
Backport #23944 by @sillyguodong Fix #23943 When trigger event is `release`, ref should be like `refs/tags/<tag_name>` instead of `CommitID` Co-authored-by: sillyguodong <33891828+sillyguodong@users.noreply.github.com>
This commit is contained in:
@@ -209,7 +209,7 @@ func newNotifyInputFromIssue(issue *issues_model.Issue, event webhook_module.Hoo
|
||||
return newNotifyInput(issue.Repo, issue.Poster, event)
|
||||
}
|
||||
|
||||
func notifyRelease(ctx context.Context, doer *user_model.User, rel *repo_model.Release, ref string, action api.HookReleaseAction) {
|
||||
func notifyRelease(ctx context.Context, doer *user_model.User, rel *repo_model.Release, action api.HookReleaseAction) {
|
||||
if err := rel.LoadAttributes(ctx); err != nil {
|
||||
log.Error("LoadAttributes: %v", err)
|
||||
return
|
||||
@@ -218,7 +218,7 @@ func notifyRelease(ctx context.Context, doer *user_model.User, rel *repo_model.R
|
||||
mode, _ := access_model.AccessLevel(ctx, doer, rel.Repo)
|
||||
|
||||
newNotifyInput(rel.Repo, doer, webhook_module.HookEventRelease).
|
||||
WithRef(ref).
|
||||
WithRef(git.TagPrefix + rel.TagName).
|
||||
WithPayload(&api.ReleasePayload{
|
||||
Action: action,
|
||||
Release: convert.ToRelease(ctx, rel),
|
||||
|
Reference in New Issue
Block a user