mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-22 01:34:18 +00:00
[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 <techknowlogick@gitea.io>
This commit is contained in:
parent
131278ff22
commit
d453533beb
28 changed files with 234 additions and 208 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue