@@ -1093,11 +1093,16 @@ func (j *DSGit) GetModelData(ctx *shared.Ctx, docs []interface{}) []insights.Com
10931093 commit .ParentSHAs , _ = doc ["parents" ].([]string )
10941094 commit .AuthoredTimestamp , _ = doc ["author_date" ].(time.Time )
10951095 authoredDt , _ := doc ["utc_author" ].(time.Time )
1096- id , err := repository .GenerateRepositoryID (commit .Source , commit .RepositoryURL , "" )
1096+ repoID , err := repository .GenerateRepositoryID (commit .Source , commit .RepositoryURL , "" )
10971097 if err != nil {
10981098 shared .Printf ("GenerateRepositoryID %+v" , err )
10991099 }
1100- commit .RepositoryID = id
1100+ commit .RepositoryID = repoID
1101+ commitID , err := insights .GenerateCommitID (repoID , commit .SHA )
1102+ if err != nil {
1103+ shared .Printf ("GenerateCommitID %+v" , err )
1104+ }
1105+ commit .ID = commitID
11011106 commit .RepositoryURL , _ = doc ["origin" ].(string )
11021107 commit .CommittedTimestamp , _ = doc ["commit_date" ].(time.Time )
11031108 createdOn := authoredDt
@@ -1110,15 +1115,20 @@ func (j *DSGit) GetModelData(ctx *shared.Ctx, docs []interface{}) []insights.Com
11101115 commitRole := insights.Contributor {}
11111116 ident := identsAry [i ]
11121117 identType := identTypesAry [i ]
1113- commitRole .Role = identType
1118+ commitRole .Role = insights . Role ( identType )
11141119 commitRole .Weight = 1.0
11151120 name := ident [0 ]
11161121 username := ""
11171122 email := ident [2 ]
11181123 name , username = shared .PostprocessNameUsername (name , username , email )
1124+ userID , err := user .GenerateIdentity (& commit .Source , & email , & name , & username )
1125+ if err != nil {
1126+ shared .Printf ("GenerateIdentity %+v" , err )
1127+ }
11191128 commitRole .Identity = user.UserIdentityObjectBase {
1129+ ID : userID ,
11201130 Email : email ,
1121- FirstName : name ,
1131+ Name : name ,
11221132 IsVerified : false ,
11231133 Username : username ,
11241134 Source : commit .Source ,
0 commit comments