summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--models/review.go8
-rw-r--r--modules/notification/base/notifier.go2
-rw-r--r--modules/notification/base/null.go4
-rw-r--r--modules/notification/mail/mail.go2
-rw-r--r--modules/notification/notification.go6
-rw-r--r--modules/notification/ui/ui.go2
-rw-r--r--services/issue/assignee.go6
7 files changed, 15 insertions, 15 deletions
diff --git a/models/review.go b/models/review.go
index bbd4983fc2..c6203e7097 100644
--- a/models/review.go
+++ b/models/review.go
@@ -467,8 +467,8 @@ func InsertReviews(reviews []*Review) error {
return sess.Commit()
}
-// AddRewiewRequest add a review request from one reviewer
-func AddRewiewRequest(issue *Issue, reviewer *User, doer *User) (comment *Comment, err error) {
+// AddReviewRequest add a review request from one reviewer
+func AddReviewRequest(issue *Issue, reviewer *User, doer *User) (comment *Comment, err error) {
review, err := GetReviewerByIssueIDAndUserID(issue.ID, reviewer.ID)
if err != nil {
return
@@ -534,8 +534,8 @@ func AddRewiewRequest(issue *Issue, reviewer *User, doer *User) (comment *Commen
return comment, sess.Commit()
}
-//RemoveRewiewRequest remove a review request from one reviewer
-func RemoveRewiewRequest(issue *Issue, reviewer *User, doer *User) (comment *Comment, err error) {
+//RemoveReviewRequest remove a review request from one reviewer
+func RemoveReviewRequest(issue *Issue, reviewer *User, doer *User) (comment *Comment, err error) {
review, err := GetReviewerByIssueIDAndUserID(issue.ID, reviewer.ID)
if err != nil {
return
diff --git a/modules/notification/base/notifier.go b/modules/notification/base/notifier.go
index 43b68b603c..0b3e1173b3 100644
--- a/modules/notification/base/notifier.go
+++ b/modules/notification/base/notifier.go
@@ -24,7 +24,7 @@ type Notifier interface {
NotifyIssueChangeStatus(*models.User, *models.Issue, *models.Comment, bool)
NotifyIssueChangeMilestone(doer *models.User, issue *models.Issue, oldMilestoneID int64)
NotifyIssueChangeAssignee(doer *models.User, issue *models.Issue, assignee *models.User, removed bool, comment *models.Comment)
- NotifyPullRewiewRequest(doer *models.User, issue *models.Issue, reviewer *models.User, isRequest bool, comment *models.Comment)
+ NotifyPullReviewRequest(doer *models.User, issue *models.Issue, reviewer *models.User, isRequest bool, comment *models.Comment)
NotifyIssueChangeContent(doer *models.User, issue *models.Issue, oldContent string)
NotifyIssueClearLabels(doer *models.User, issue *models.Issue)
NotifyIssueChangeTitle(doer *models.User, issue *models.Issue, oldTitle string)
diff --git a/modules/notification/base/null.go b/modules/notification/base/null.go
index 4b5efd80bb..d2fd51d713 100644
--- a/modules/notification/base/null.go
+++ b/modules/notification/base/null.go
@@ -86,8 +86,8 @@ func (*NullNotifier) NotifyIssueChangeContent(doer *models.User, issue *models.I
func (*NullNotifier) NotifyIssueChangeAssignee(doer *models.User, issue *models.Issue, assignee *models.User, removed bool, comment *models.Comment) {
}
-// NotifyPullRewiewRequest places a place holder function
-func (*NullNotifier) NotifyPullRewiewRequest(doer *models.User, issue *models.Issue, reviewer *models.User, isRequest bool, comment *models.Comment) {
+// NotifyPullReviewRequest places a place holder function
+func (*NullNotifier) NotifyPullReviewRequest(doer *models.User, issue *models.Issue, reviewer *models.User, isRequest bool, comment *models.Comment) {
}
// NotifyIssueClearLabels places a place holder function
diff --git a/modules/notification/mail/mail.go b/modules/notification/mail/mail.go
index b5c2db3831..b980db7e4b 100644
--- a/modules/notification/mail/mail.go
+++ b/modules/notification/mail/mail.go
@@ -100,7 +100,7 @@ func (m *mailNotifier) NotifyIssueChangeAssignee(doer *models.User, issue *model
}
}
-func (m *mailNotifier) NotifyPullRewiewRequest(doer *models.User, issue *models.Issue, reviewer *models.User, isRequest bool, comment *models.Comment) {
+func (m *mailNotifier) NotifyPullReviewRequest(doer *models.User, issue *models.Issue, reviewer *models.User, isRequest bool, comment *models.Comment) {
if isRequest && doer.ID != reviewer.ID && reviewer.EmailNotifications() == models.EmailNotificationsEnabled {
ct := fmt.Sprintf("Requested to review #%d.", issue.Index)
mailer.SendIssueAssignedMail(issue, doer, ct, comment, []string{reviewer.Email})
diff --git a/modules/notification/notification.go b/modules/notification/notification.go
index 95117c1f3e..d120246634 100644
--- a/modules/notification/notification.go
+++ b/modules/notification/notification.go
@@ -150,10 +150,10 @@ func NotifyIssueChangeAssignee(doer *models.User, issue *models.Issue, assignee
}
}
-// NotifyPullRewiewRequest notifies Request Review change
-func NotifyPullRewiewRequest(doer *models.User, issue *models.Issue, reviewer *models.User, isRequest bool, comment *models.Comment) {
+// NotifyPullReviewRequest notifies Request Review change
+func NotifyPullReviewRequest(doer *models.User, issue *models.Issue, reviewer *models.User, isRequest bool, comment *models.Comment) {
for _, notifier := range notifiers {
- notifier.NotifyPullRewiewRequest(doer, issue, reviewer, isRequest, comment)
+ notifier.NotifyPullReviewRequest(doer, issue, reviewer, isRequest, comment)
}
}
diff --git a/modules/notification/ui/ui.go b/modules/notification/ui/ui.go
index 6ce14a90cc..7f7de10bed 100644
--- a/modules/notification/ui/ui.go
+++ b/modules/notification/ui/ui.go
@@ -121,7 +121,7 @@ func (ns *notificationService) NotifyIssueChangeAssignee(doer *models.User, issu
}
}
-func (ns *notificationService) NotifyPullRewiewRequest(doer *models.User, issue *models.Issue, reviewer *models.User, isRequest bool, comment *models.Comment) {
+func (ns *notificationService) NotifyPullReviewRequest(doer *models.User, issue *models.Issue, reviewer *models.User, isRequest bool, comment *models.Comment) {
if isRequest {
var opts = issueNotificationOpts{
IssueID: issue.ID,
diff --git a/services/issue/assignee.go b/services/issue/assignee.go
index 9711de4c60..d63c7bf032 100644
--- a/services/issue/assignee.go
+++ b/services/issue/assignee.go
@@ -56,9 +56,9 @@ func ToggleAssignee(issue *models.Issue, doer *models.User, assigneeID int64) (r
func ReviewRequest(issue *models.Issue, doer *models.User, reviewer *models.User, isAdd bool) (err error) {
var comment *models.Comment
if isAdd {
- comment, err = models.AddRewiewRequest(issue, reviewer, doer)
+ comment, err = models.AddReviewRequest(issue, reviewer, doer)
} else {
- comment, err = models.RemoveRewiewRequest(issue, reviewer, doer)
+ comment, err = models.RemoveReviewRequest(issue, reviewer, doer)
}
if err != nil {
@@ -66,7 +66,7 @@ func ReviewRequest(issue *models.Issue, doer *models.User, reviewer *models.User
}
if comment != nil {
- notification.NotifyPullRewiewRequest(doer, issue, reviewer, isAdd, comment)
+ notification.NotifyPullReviewRequest(doer, issue, reviewer, isAdd, comment)
}
return nil