diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-11-02 11:33:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-02 11:33:20 +0800 |
commit | 8f26397928b33a16558dafc2716a72b6e6900bf4 (patch) | |
tree | 64604da13ff190b9aa6d3f4dc94fe7c8352a99e9 /routers/api/v1/repo | |
parent | f518fe66620bcb60a5251befca116f8caa48ee42 (diff) | |
download | gitea-8f26397928b33a16558dafc2716a72b6e6900bf4.tar.gz gitea-8f26397928b33a16558dafc2716a72b6e6900bf4.zip |
Move issue milestone assign to issue service and move webhook to notification (#8780)
Diffstat (limited to 'routers/api/v1/repo')
-rw-r--r-- | routers/api/v1/repo/issue.go | 3 | ||||
-rw-r--r-- | routers/api/v1/repo/pull.go | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go index fe5862ea5e..1534c45df0 100644 --- a/routers/api/v1/repo/issue.go +++ b/routers/api/v1/repo/issue.go @@ -20,7 +20,6 @@ import ( "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" issue_service "code.gitea.io/gitea/services/issue" - milestone_service "code.gitea.io/gitea/services/milestone" ) // SearchIssues searches for issues across the repositories that the user has access to @@ -494,7 +493,7 @@ func EditIssue(ctx *context.APIContext, form api.EditIssueOption) { issue.MilestoneID != *form.Milestone { oldMilestoneID := issue.MilestoneID issue.MilestoneID = *form.Milestone - if err = milestone_service.ChangeMilestoneAssign(issue, ctx.User, oldMilestoneID); err != nil { + if err = issue_service.ChangeMilestoneAssign(issue, ctx.User, oldMilestoneID); err != nil { ctx.Error(500, "ChangeMilestoneAssign", err) return } diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index 0180aebf89..9264c00cec 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -18,7 +18,6 @@ import ( api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/timeutil" issue_service "code.gitea.io/gitea/services/issue" - milestone_service "code.gitea.io/gitea/services/milestone" pull_service "code.gitea.io/gitea/services/pull" ) @@ -420,7 +419,7 @@ func EditPullRequest(ctx *context.APIContext, form api.EditPullRequestOption) { issue.MilestoneID != form.Milestone { oldMilestoneID := issue.MilestoneID issue.MilestoneID = form.Milestone - if err = milestone_service.ChangeMilestoneAssign(issue, ctx.User, oldMilestoneID); err != nil { + if err = issue_service.ChangeMilestoneAssign(issue, ctx.User, oldMilestoneID); err != nil { ctx.Error(500, "ChangeMilestoneAssign", err) return } |