From 153f6cdd061c74fd3843748d9e2f8406dc0e1a5f Mon Sep 17 00:00:00 2001 From: wanghaosq Date: Tue, 24 Aug 2021 10:18:59 +0800 Subject: [PATCH] fix --- pkg/cibot/pullrequest.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/cibot/pullrequest.go b/pkg/cibot/pullrequest.go index c437881..603be48 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) -- Gitee