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

Commit d63f713

Browse files
Fix mark orphand commits (#85)
* fix mark orphand commits Signed-off-by: Ayman <[email protected]> * clean up Signed-off-by: Ayman <[email protected]> * clean up Signed-off-by: Ayman <[email protected]> * clean up Signed-off-by: Ayman <[email protected]> * code clean up Signed-off-by: Ayman <[email protected]> --------- Signed-off-by: Ayman <[email protected]> Co-authored-by: Ayman <[email protected]>
1 parent 6bf9e18 commit d63f713

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ workflows:
9191
- build
9292
filters:
9393
branches:
94-
only: main
94+
only: main
9595
tags:
9696
ignore: /.*/
9797
- approve_prod:

cmd/git/git.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1801,6 +1801,11 @@ func (j *DSGit) GitEnrichItems(ctx *shared.Ctx, thrN int, items []interface{}, d
18011801
j.log.WithFields(logrus.Fields{"operation": "GitEnrichItems"}).Errorf("error hash data for commit %s, error %v", d.Payload, err)
18021802
continue
18031803
}
1804+
commitB, err := jsoniter.Marshal(d.Payload)
1805+
if err != nil {
1806+
return
1807+
}
1808+
commitStr := b64.StdEncoding.EncodeToString(commitB)
18041809
hashExist := isHashCreated(contentHash)
18051810
isCreated := isCommitCreated(d.Payload.ID)
18061811
if !hashExist && !isCreated {
@@ -1810,6 +1815,7 @@ func (j *DSGit) GitEnrichItems(ctx *shared.Ctx, thrN int, items []interface{}, d
18101815
Timestamp: fmt.Sprintf("%v", tStamp),
18111816
EntityID: d.Payload.ID,
18121817
SourceEntityID: d.Payload.SHA,
1818+
Content: commitStr,
18131819
Hash: contentHash,
18141820
})
18151821
createdCommits[d.Payload.ID] = true
@@ -1829,6 +1835,7 @@ func (j *DSGit) GitEnrichItems(ctx *shared.Ctx, thrN int, items []interface{}, d
18291835
Timestamp: fmt.Sprintf("%v", tStamp),
18301836
EntityID: d.Payload.ID,
18311837
SourceEntityID: d.Payload.SHA,
1838+
Content: commitStr,
18321839
Hash: contentHash,
18331840
})
18341841
}
@@ -2446,7 +2453,7 @@ func (j *DSGit) Sync(ctx *shared.Ctx) (err error) {
24462453
if err != nil {
24472454
return err
24482455
}
2449-
tm := time.Unix(i, 0)
2456+
tm := time.Unix(i, 0).UTC()
24502457
ctx.DateFrom = &tm
24512458
}
24522459
if ctx.DateFrom != nil {

0 commit comments

Comments
 (0)