feat: remove author and hash commit
parent
5b5d186805
commit
0fe1c6795e
|
@ -3,23 +3,11 @@ package git
|
||||||
import "github.com/go-git/go-git/v5/plumbing/object"
|
import "github.com/go-git/go-git/v5/plumbing/object"
|
||||||
|
|
||||||
type Commit struct {
|
type Commit struct {
|
||||||
Hash string
|
|
||||||
Author Author
|
|
||||||
Message string
|
Message string
|
||||||
}
|
}
|
||||||
|
|
||||||
type Author struct {
|
|
||||||
Name string
|
|
||||||
Email string
|
|
||||||
}
|
|
||||||
|
|
||||||
func newCommit(commit *object.Commit) Commit {
|
func newCommit(commit *object.Commit) Commit {
|
||||||
return Commit{
|
return Commit{
|
||||||
Hash: commit.Hash.String(),
|
|
||||||
Author: Author{
|
|
||||||
Name: commit.Author.Name,
|
|
||||||
Email: commit.Author.Email,
|
|
||||||
},
|
|
||||||
Message: commit.Message,
|
Message: commit.Message,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue