Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spelling mistake with Review #11262

Merged
merged 1 commit into from
Apr 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions models/review.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion modules/notification/base/notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions modules/notification/base/null.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion modules/notification/mail/mail.go
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
6 changes: 3 additions & 3 deletions modules/notification/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/notification/ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions services/issue/assignee.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ 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 {
return
}

if comment != nil {
notification.NotifyPullRewiewRequest(doer, issue, reviewer, isAdd, comment)
notification.NotifyPullReviewRequest(doer, issue, reviewer, isAdd, comment)
}

return nil
Expand Down