From 0fd1672ae49a5f69fca7d90336ae75be83a21014 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 10 Jul 2023 17:31:19 +0800 Subject: For API attachments, use API URL (#25639) Fix #25257 --------- Co-authored-by: Giteabot --- services/actions/notifier.go | 4 ++-- services/actions/notifier_helper.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'services/actions') diff --git a/services/actions/notifier.go b/services/actions/notifier.go index 507eeaacf6..cfe2e284da 100644 --- a/services/actions/notifier.go +++ b/services/actions/notifier.go @@ -171,7 +171,7 @@ func (n *actionsNotifier) NotifyCreateIssueComment(ctx context.Context, doer *us WithPayload(&api.IssueCommentPayload{ Action: api.HookIssueCommentCreated, Issue: convert.ToAPIIssue(ctx, issue), - Comment: convert.ToComment(ctx, comment), + Comment: convert.ToAPIComment(ctx, repo, comment), Repository: convert.ToRepo(ctx, repo, permission), Sender: convert.ToUser(ctx, doer, nil), IsPull: true, @@ -185,7 +185,7 @@ func (n *actionsNotifier) NotifyCreateIssueComment(ctx context.Context, doer *us WithPayload(&api.IssueCommentPayload{ Action: api.HookIssueCommentCreated, Issue: convert.ToAPIIssue(ctx, issue), - Comment: convert.ToComment(ctx, comment), + Comment: convert.ToAPIComment(ctx, repo, comment), Repository: convert.ToRepo(ctx, repo, permission), Sender: convert.ToUser(ctx, doer, nil), IsPull: false, diff --git a/services/actions/notifier_helper.go b/services/actions/notifier_helper.go index c4c2a0df29..90ad3001ba 100644 --- a/services/actions/notifier_helper.go +++ b/services/actions/notifier_helper.go @@ -260,7 +260,7 @@ func notifyRelease(ctx context.Context, doer *user_model.User, rel *repo_model.R WithRef(git.RefNameFromTag(rel.TagName).String()). WithPayload(&api.ReleasePayload{ Action: action, - Release: convert.ToRelease(ctx, rel), + Release: convert.ToAPIRelease(ctx, rel.Repo, rel), Repository: convert.ToRepo(ctx, rel.Repo, permission), Sender: convert.ToUser(ctx, doer, nil), }). -- cgit v1.2.3