diff --git a/pkg/cibot/pullrequest.go b/pkg/cibot/pullrequest.go index c4378814b2bed9d7d7f3adfc8e0d6a55097befe0..603be48b72026c2a385f51986707bb998ec12a83 100644 --- a/pkg/cibot/pullrequest.go +++ b/pkg/cibot/pullrequest.go @@ -152,6 +152,15 @@ func (s *Server) HandlePullRequestEvent(actionDesc string, event *gitee.PullRequ } delLabels, updateLabels := GetChangeLabels(s.Config.DelLabels, pr.Labels) if len(delLabels) == 0 { + // Add retest comment for update push. + retest_comment := "/retest" + cBody := gitee.PullRequestCommentPostParam{} + cBody.AccessToken = s.Config.GiteeToken + cBody.Body = fmt.Sprintf(retest_comment) + _, _, err = s.GiteeClient.PullRequestsApi.PostV5ReposOwnerRepoPullsNumberComments(s.Context, owner, repo, number, cBody) + if err != nil{ + glog.Info("Add retest comment failed. err: %v", err) + } return } err = s.UpdateLabelsBySourceBranchChange(delLabels, updateLabels, event)