Fix spelling mistake with Rewiew (#11262)
Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
ab69b9b1a6
commit
4974b7c120
7 changed files with 15 additions and 15 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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})
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue