From d29e40b1d7f4b0f81526d61dd6b6e90cd77d7c54 Mon Sep 17 00:00:00 2001 From: wanghaosq Date: Thu, 28 Oct 2021 11:51:00 +0800 Subject: [PATCH] fix probblems --- pkg/cibot/approve.go | 8 ++++---- pkg/cibot/lgtm.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/cibot/approve.go b/pkg/cibot/approve.go index ee63c9b..20d8891 100644 --- a/pkg/cibot/approve.go +++ b/pkg/cibot/approve.go @@ -9,9 +9,9 @@ import ( ) const ( - approvedAddedMessage = `***approved*** is added in this pull request by: ***%s***. :wave: + approvedAddedMessage = `***approved*** was added to this pull request by: ***%s***. :wave: **NOTE:**: If you find this pull request unmerged while all conditions meets, you are encouraged use command: "/check-pr" to try it again. :smile: ` - approvedRemovedMessage = `***approved*** is removed in this pull request by: ***%s***. :flushed: ` + approvedRemovedMessage = `***approved*** was removed in this pull request by: ***%s***. :flushed: ` approvedAddNoPermissionMessage = `***%s*** has no permission to add ***approved*** in this pull request. :astonished: please contact to the collaborators in this repository.` approvedRemoveNoPermissionMessage = `***%s*** has no permission to remove ***approved*** in this pull request. :astonished: @@ -56,7 +56,7 @@ func (s *Server) AddApprove(event *gitee.NoteEvent) error { } // permission: admin, write, read, none - if permission.Permission == "admin" || permission.Permission == "write" || isOwner || r == 1 { + if permission.Permission == "admin" || permission.Permission == "write" || isOwner { // add approved label addlabel := &gitee.NoteEvent{} addlabel.PullRequest = event.PullRequest @@ -140,7 +140,7 @@ func (s *Server) RemoveApprove(event *gitee.NoteEvent) error { } // permission: admin, write, read, none - if permission.Permission == "admin" || permission.Permission == "write" || isOwner || r == 1 { + if permission.Permission == "admin" || permission.Permission == "write" || isOwner { // remove approved label removelabel := &gitee.NoteEvent{} removelabel.PullRequest = event.PullRequest diff --git a/pkg/cibot/lgtm.go b/pkg/cibot/lgtm.go index b677aa5..10ded1f 100644 --- a/pkg/cibot/lgtm.go +++ b/pkg/cibot/lgtm.go @@ -14,7 +14,7 @@ const ( lgtmSelfOwnMessage = `Sorry, you cannot add ***lgtm*** to the pull request you created. :astonished:` lgtmAddedMessage = `***lgtm*** was added to this pull request by: ***%s***. :wave: **NOTE:** If this pull request is not merged while all conditions are met, comment "/check-pr" to try again. :smile: ` - lgtmRemovedMessage = `***lgtm*** is removed in this pull request by: ***%s***. :flushed: ` + lgtmRemovedMessage = `***lgtm*** was removed in this pull request by: ***%s***. :flushed: ` lgtmAddNoPermissionMessage = `Thanks for your review, ***%s***, your opinion is very important to us.:wave: The maintainers will consider your advice carefully.` lgtmRemoveNoPermissionMessage = `***%s*** has no permission to remove ***lgtm*** in this pull request. :astonished: -- Gitee