Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.

Commit ff071f9

Browse files
authored
update repo source in event (#44)
Signed-off-by: Ibrahim Mbaziira <[email protected]>
1 parent 8f40c6b commit ff071f9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cmd/git/git.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,7 @@ func (j *DSGit) GetModelData(ctx *shared.Ctx, docs []interface{}) []git.CommitCr
12011201
commitBaseEvent := git.CommitBaseEvent{
12021202
Connector: insights.GitConnector,
12031203
ConnectorVersion: GitBackendVersion,
1204+
Source: insights.Source(j.RepositorySource),
12041205
}
12051206

12061207
repoID, err := repository.GenerateRepositoryID(j.SourceID, j.URL, j.RepositorySource)
@@ -1216,8 +1217,6 @@ func (j *DSGit) GetModelData(ctx *shared.Ctx, docs []interface{}) []git.CommitCr
12161217
commit.DefaultBranch, _ = doc["is_default_branch"].(bool)
12171218
commit.ShortHash, _ = doc["hash_short"].(string)
12181219
commit.DocCommit, _ = doc["doc_commit"].(bool)
1219-
source, _ := doc["commit_repo_type"].(string)
1220-
commitBaseEvent.Source = insights.Source(source)
12211220
commit.Message, _ = doc["message"].(string)
12221221
_, commit.Orphaned = j.OrphanedMap[commit.SHA]
12231222
commit.ParentSHAs, _ = doc["parents"].([]string)

0 commit comments

Comments
 (0)