This is an automated email from the ASF dual-hosted git repository. klesh pushed a commit to branch kw-gitext-commit-not-rawdataorigin in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 0b2a7b3e8cef8f1b32d8586b1d60d0cdf361db30 Author: Klesh Wong <[email protected]> AuthorDate: Mon Jun 24 20:45:49 2024 +0800 fix: git extractor commit rawdataorigin is empty --- backend/plugins/gitextractor/store/database.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/plugins/gitextractor/store/database.go b/backend/plugins/gitextractor/store/database.go index 63ec7e2de..3525cd689 100644 --- a/backend/plugins/gitextractor/store/database.go +++ b/backend/plugins/gitextractor/store/database.go @@ -18,6 +18,8 @@ limitations under the License. package store import ( + "reflect" + "github.com/apache/incubator-devlake/core/context" "github.com/apache/incubator-devlake/core/errors" "github.com/apache/incubator-devlake/core/models/common" @@ -25,7 +27,6 @@ import ( "github.com/apache/incubator-devlake/core/models/domainlayer/code" "github.com/apache/incubator-devlake/core/models/domainlayer/crossdomain" helper "github.com/apache/incubator-devlake/helpers/pluginhelper/api" - "reflect" ) const BathSize = 100 @@ -51,6 +52,7 @@ func NewDatabase(basicRes context.BasicRes, repoId string) *Database { } func (d *Database) updateRawDataFields(rawData *common.RawDataOrigin) { + print("update raw data", d.table) rawData.RawDataTable = d.table rawData.RawDataParams = d.params } @@ -87,7 +89,7 @@ func (d *Database) Commits(commit *code.Commit) errors.Error { if err != nil { return err } - d.updateRawDataFields(&account.RawDataOrigin) + d.updateRawDataFields(&commit.RawDataOrigin) return commitBatch.Add(commit) }
