mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-01 17:38:33 +00:00
Add PushCommit
This commit is contained in:
parent
f48fc24670
commit
a726c125b5
3 changed files with 18 additions and 9 deletions
|
@ -130,11 +130,15 @@ func runUpdate(c *cli.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
commits := make([][]string, 0)
|
||||
commits := make([]*base.PushCommit, 0)
|
||||
var maxCommits = 3
|
||||
for e := l.Front(); e != nil; e = e.Next() {
|
||||
commit := e.Value.(*git.Commit)
|
||||
commits = append(commits, []string{commit.Id().String(), commit.Message()})
|
||||
commits = append(commits,
|
||||
&base.PushCommit{commit.Id().String(),
|
||||
commit.Message(),
|
||||
commit.Author.Email,
|
||||
commit.Author.Name})
|
||||
if len(commits) >= maxCommits {
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue