diff options
| author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2025-02-06 22:56:46 +0100 | 
|---|---|---|
| committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2025-02-06 22:56:46 +0100 | 
| commit | 77f5ad1047dc2ae72cd616dc2acc839ea38d881f (patch) | |
| tree | 81f3d562ee93252e52e3ede5e3167ed62a96f84f /pkg/service/git.go | |
| parent | cb9036aab96895ddf03cab68f75d3356f5227968 (diff) | |
| download | cerrado-77f5ad1047dc2ae72cd616dc2acc839ea38d881f.tar.gz cerrado-77f5ad1047dc2ae72cd616dc2acc839ea38d881f.tar.bz2 cerrado-77f5ad1047dc2ae72cd616dc2acc839ea38d881f.zip | |
feat: Add last commit information
Diffstat (limited to 'pkg/service/git.go')
| -rw-r--r-- | pkg/service/git.go | 20 | 
1 files changed, 10 insertions, 10 deletions
| 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(),  		})  	} | 
