Skip to content

Commit 927cefc

Browse files
a1012112796delvh
authored andcommitted
Load assignees to be able to mention them
contributed by a1012112796 <[email protected]>
2 parents 8b953d9 + 88494c1 commit 927cefc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

routers/web/repo/release.go

+15
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,14 @@ func NewRelease(ctx *context.Context) {
328328
}
329329
}
330330
ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled
331+
var err error
332+
// Get assignees.
333+
ctx.Data["Assignees"], err = repo_model.GetRepoAssignees(ctx, ctx.Repo.Repository)
334+
if err != nil {
335+
ctx.ServerError("GetAssignees", err)
336+
return
337+
}
338+
331339
upload.AddUploadContext(ctx, "release")
332340
ctx.HTML(http.StatusOK, tplReleaseNew)
333341
}
@@ -484,6 +492,13 @@ func EditRelease(ctx *context.Context) {
484492
}
485493
ctx.Data["attachments"] = rel.Attachments
486494

495+
// Get assignees.
496+
ctx.Data["Assignees"], err = repo_model.GetRepoAssignees(ctx, rel.Repo)
497+
if err != nil {
498+
ctx.ServerError("GetAssignees", err)
499+
return
500+
}
501+
487502
ctx.HTML(http.StatusOK, tplReleaseNew)
488503
}
489504

0 commit comments

Comments
 (0)