From 77f5ad1047dc2ae72cd616dc2acc839ea38d881f Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Thu, 6 Feb 2025 22:56:46 +0100 Subject: feat: Add last commit information --- pkg/service/git.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'pkg/service/git.go') diff --git a/pkg/service/git.go b/pkg/service/git.go index 2d00715..773d335 100644 --- a/pkg/service/git.go +++ b/pkg/service/git.go @@ -15,11 +15,11 @@ import ( type ( Repository struct { - Name string - Description string - Public bool - LastCommitDate string - Ref string + Name string + Description string + Public bool + LastCommit *object.Commit + Ref string } GitService struct { @@ -70,11 +70,11 @@ func (g *GitService) ListRepositories() ([]*Repository, error) { } repos = append(repos, &Repository{ - Name: r.Name, - Description: r.Description, - Public: r.Public, - LastCommitDate: obj.Author.When.Format(timeFormat), - Ref: head.Name().Short(), + Name: r.Name, + Description: r.Description, + Public: r.Public, + LastCommit: obj, + Ref: head.Name().Short(), }) } -- cgit v1.2.3