|
@@ -36,6 +36,9 @@ func refType(ref string) string {
|
36
|
36
|
}
|
37
|
37
|
|
38
|
38
|
func truncateSha(sha string) string {
|
|
39
|
+ if len(sha) < 8 {
|
|
40
|
+ return ""
|
|
41
|
+ }
|
39
|
42
|
return sha[len(sha)-7:]
|
40
|
43
|
}
|
41
|
44
|
|
|
@@ -99,7 +102,7 @@ func commitLimit(pl github.PushPayload, length int) []Commit {
|
99
|
102
|
if !c.Distinct {
|
100
|
103
|
continue
|
101
|
104
|
}
|
102
|
|
- res = append(res, Commit{Message: c.Message, Username: c.Author.Username, Sha: c.Sha})
|
|
105
|
+ res = append(res, Commit{Message: c.Message, Username: c.Author.Username, Sha: c.ID})
|
103
|
106
|
i += 1
|
104
|
107
|
if i == length {
|
105
|
108
|
break
|