diff --git a/models/issue_comment.go b/models/issue_comment.go index c1e2285fc..7e8992044 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -61,9 +61,9 @@ const ( // Cancel a stopwatch for time tracking CommentTypeCancelTracking // Dependency added - CommentTypeAddedDependency + CommentTypeAddDependency //Dependency removed - CommentTypeRemovedDependency + CommentTypeRemoveDependency ) // CommentTag defines comment tag type @@ -521,10 +521,10 @@ func createDeleteBranchComment(e *xorm.Session, doer *User, repo *Repository, is } // Creates issue dependency comment -func createIssueDependencyComment(e *xorm.Session, doer *User, issue *Issue, dependantIssue *Issue, added bool) (*Comment, error) { - cType := CommentTypeAddedDependency +func createIssueDependencyComment(e *xorm.Session, doer *User, issue *Issue, dependentIssue *Issue, added bool) (*Comment, error) { + cType := CommentTypeAddDependency if !added { - cType = CommentTypeRemovedDependency + cType = CommentTypeRemoveDependency } return createComment(e, &CreateCommentOptions{ @@ -532,7 +532,7 @@ func createIssueDependencyComment(e *xorm.Session, doer *User, issue *Issue, dep Doer: doer, Repo: issue.Repo, Issue: issue, - DependentIssue: dependantIssue, + DependentIssue: dependentIssue, Content: issue.Title, }) } diff --git a/routers/repo/issue.go b/routers/repo/issue.go index d28e3682f..cd519b690 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -684,7 +684,7 @@ func ViewIssue(ctx *context.Context) { ctx.Handle(500, "LoadAssignees", err) return } - } else if comment.Type == models.CommentTypeRemovedDependency || comment.Type == models.CommentTypeAddedDependency { + } else if comment.Type == models.CommentTypeRemoveDependency || comment.Type == models.CommentTypeAddDependency { if err = comment.LoadDepIssueDetails(); err != nil { ctx.Handle(http.StatusInternalServerError, "LoadDepIssueDetails", err) return