fix: correct repo/attatchment absolute url and release layout (#39178)

This commit is contained in:
wxiaoguang
2026-08-31 23:31:17 +00:00
committed by GitHub
parent fc9800b383
commit 4875bb3b2b
21 changed files with 72 additions and 80 deletions
+2 -2
View File
@@ -33,7 +33,7 @@ func ToAPIIssue(ctx context.Context, doer *user_model.User, issue *issues_model.
return toIssue(ctx, doer, issue, APIAssetDownloadURL)
}
func toIssue(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, getDownloadURL func(repo *repo_model.Repository, attach *repo_model.Attachment) string) *api.Issue {
func toIssue(ctx context.Context, doer *user_model.User, issue *issues_model.Issue, getDownloadURL func(ctx context.Context, repo *repo_model.Repository, attach *repo_model.Attachment) string) *api.Issue {
if err := issue.LoadPoster(ctx); err != nil {
return &api.Issue{}
}
@@ -53,7 +53,7 @@ func toIssue(ctx context.Context, doer *user_model.User, issue *issues_model.Iss
Poster: ToUser(ctx, issue.Poster, doer),
Title: issue.Title,
Body: issue.Content,
Attachments: toAttachments(issue.Repo, issue.Attachments, getDownloadURL),
Attachments: toAttachments(ctx, issue.Repo, issue.Attachments, getDownloadURL),
Ref: issue.Ref,
State: issue.State(),
IsLocked: issue.IsLocked,