Skip to content

Commit

Permalink
Load assignees to be able to mention them
Browse files Browse the repository at this point in the history
contributed by a1012112796 <1012112796@qq.com>
  • Loading branch information
a1012112796 authored and delvh committed Jan 31, 2023
2 parents 8b953d9 + 88494c1 commit 927cefc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions routers/web/repo/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,14 @@ func NewRelease(ctx *context.Context) {
}
}
ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled
var err error
// Get assignees.
ctx.Data["Assignees"], err = repo_model.GetRepoAssignees(ctx, ctx.Repo.Repository)
if err != nil {
ctx.ServerError("GetAssignees", err)
return
}

upload.AddUploadContext(ctx, "release")
ctx.HTML(http.StatusOK, tplReleaseNew)
}
Expand Down Expand Up @@ -484,6 +492,13 @@ func EditRelease(ctx *context.Context) {
}
ctx.Data["attachments"] = rel.Attachments

// Get assignees.
ctx.Data["Assignees"], err = repo_model.GetRepoAssignees(ctx, rel.Repo)
if err != nil {
ctx.ServerError("GetAssignees", err)
return
}

ctx.HTML(http.StatusOK, tplReleaseNew)
}

Expand Down

0 comments on commit 927cefc

Please sign in to comment.