MCPcopy Create free account
hub / github.com/gogs/gogs / UpdateIssueAssignee

Function UpdateIssueAssignee

internal/route/repo/issue.go:807–829  ·  view source on GitHub ↗
(c *context.Context)

Source from the content-addressed store, hash-verified

805}
806
807func UpdateIssueAssignee(c *context.Context) {
808 issue := getActionIssue(c)
809 if c.Written() {
810 return
811 }
812
813 assigneeID := c.QueryInt64("id")
814 if issue.AssigneeID == assigneeID {
815 c.JSONSuccess(map[string]any{
816 "ok": true,
817 })
818 return
819 }
820
821 if err := issue.ChangeAssignee(c.User, assigneeID); err != nil {
822 c.Error(err, "change assignee")
823 return
824 }
825
826 c.JSONSuccess(map[string]any{
827 "ok": true,
828 })
829}
830
831func NewComment(c *context.Context, f form.CreateComment) {
832 issue := getActionIssue(c)

Callers

nothing calls this directly

Calls 4

getActionIssueFunction · 0.85
JSONSuccessMethod · 0.80
ChangeAssigneeMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected