From 2732b2b6204688f8918febd5e33fbe88985f9ab2 Mon Sep 17 00:00:00 2001 From: georgecao Date: Thu, 12 Aug 2021 20:42:02 +0800 Subject: [PATCH] Add retest comment for updating push. --- pkg/cibot/pullrequest.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/cibot/pullrequest.go b/pkg/cibot/pullrequest.go index 6a79ba9..c9d8c26 100644 --- a/pkg/cibot/pullrequest.go +++ b/pkg/cibot/pullrequest.go @@ -135,6 +135,15 @@ func (s *Server) HandlePullRequestEvent(actionDesc string, event *gitee.PullRequ if err != nil { glog.Info(err) } + // 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) + } // remove lgtm if changes happen /*if s.hasLgtmLabel(pr.Labels) { err = s.CheckLgtmByPullRequestUpdate(event) -- Gitee