diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-07-10 17:31:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-10 09:31:19 +0000 |
commit | 0fd1672ae49a5f69fca7d90336ae75be83a21014 (patch) | |
tree | 21b651c5ae3bf4db7434ef44de1ac9b4c7865703 /services/actions | |
parent | 5489962aac6faf3260176a0f53cbb78c44c421a5 (diff) | |
download | gitea-0fd1672ae49a5f69fca7d90336ae75be83a21014.tar.gz gitea-0fd1672ae49a5f69fca7d90336ae75be83a21014.zip |
For API attachments, use API URL (#25639)
Fix #25257
---------
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'services/actions')
-rw-r--r-- | services/actions/notifier.go | 4 | ||||
-rw-r--r-- | services/actions/notifier_helper.go | 2 |
2 files changed, 3 insertions, 3 deletions
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), }). |