From d453533beb197d25b25530dc5f0e3c3c0742d8d1 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sat, 17 Oct 2020 06:23:08 +0200 Subject: [Refactor] Move APIFormat functions into convert package (#12856) * USER APIFormat -> ToUser * Migrate more and mark APIFormat deprecated * models.Comment APIFormat() -> convert.ToComment * models.Release APIFormat() -> convert.ToRelease * models.Attachments APIFormat() -> convert.ToReleaseAttachments * models.CommitStatus APIFormat() -> convert.ToCommitStatus * finish migration to convert.ToUser * Move Test * Imprufe Test * fix test Co-authored-by: techknowlogick --- modules/convert/pull.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/convert/pull.go') diff --git a/modules/convert/pull.go b/modules/convert/pull.go index 2fa22efcb3..e522bee787 100644 --- a/modules/convert/pull.go +++ b/modules/convert/pull.go @@ -141,7 +141,7 @@ func ToAPIPullRequest(pr *models.PullRequest) *api.PullRequest { if pr.HasMerged { apiPullRequest.Merged = pr.MergedUnix.AsTimePtr() apiPullRequest.MergedCommitID = &pr.MergedCommitID - apiPullRequest.MergedBy = pr.Merger.APIFormat() + apiPullRequest.MergedBy = ToUser(pr.Merger, false, false) } return apiPullRequest -- cgit v1.2.3