From 08d1cbd70a1cacb5f43c42059d76c612414b6c5b Mon Sep 17 00:00:00 2001 From: Yingchu Chen <18100806616@163.com> Date: Thu, 31 Mar 2022 09:08:54 +0800 Subject: [PATCH] fix(github): fix minor bug close #1426 --- plugins/github/tasks/github_pull_request_commit_convertor.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/github/tasks/github_pull_request_commit_convertor.go b/plugins/github/tasks/github_pull_request_commit_convertor.go index c93295f7dff..855bb9448e2 100644 --- a/plugins/github/tasks/github_pull_request_commit_convertor.go +++ b/plugins/github/tasks/github_pull_request_commit_convertor.go @@ -37,7 +37,7 @@ func PrCommitConvertor(ctx context.Context, repoId int) (err error) { return err } if pullRequestId != githubPullRequestCommit.PullRequestId { - domainPullRequestId = domainIdGenerator.Generate(pullRequestId) + domainPullRequestId = domainIdGenerator.Generate(githubPullRequestCommit.PullRequestId) err := lakeModels.Db.Where("pull_request_id = ?", domainPullRequestId).Delete(&code.PullRequestCommit{}).Error if err != nil { @@ -45,7 +45,6 @@ func PrCommitConvertor(ctx context.Context, repoId int) (err error) { } pullRequestId = githubPullRequestCommit.PullRequestId } - if err != nil { return err }