diff options
author | delvh <leon@kske.dev> | 2023-02-01 20:14:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-01 13:14:40 -0600 |
commit | b6b8feb3dec19e7bc96bc583acf10c01afca3362 (patch) | |
tree | 5bfd5bcae06eef8ef7933c9d99911fb5c0e11565 /routers | |
parent | 6ba9ff7b4899f1057ac6e41947951da3e43b6918 (diff) | |
download | gitea-b6b8feb3dec19e7bc96bc583acf10c01afca3362.tar.gz gitea-b6b8feb3dec19e7bc96bc583acf10c01afca3362.zip |
Enable `@<user>`- completion popup on the release description textarea (#22359)
For some unknown reason, this was previously disabled.
Additionally removed an unused return value.
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/release.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/routers/web/repo/release.go b/routers/web/repo/release.go index 54f503642b..5204b5fd00 100644 --- a/routers/web/repo/release.go +++ b/routers/web/repo/release.go @@ -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) } @@ -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) } |