diff --git a/gitea/repo.go b/gitea/repo.go index 9fa0545..7ccde53 100644 --- a/gitea/repo.go +++ b/gitea/repo.go @@ -93,6 +93,7 @@ type Repository struct { AvatarURL string `json:"avatar_url"` Internal bool `json:"internal"` MirrorInterval string `json:"mirror_interval"` + MirrorUpdated time.Time `json:"mirror_updated,omitempty"` DefaultMergeStyle MergeStyle `json:"default_merge_style"` } diff --git a/gitea/repo_test.go b/gitea/repo_test.go index ee9c396..a7e572b 100644 --- a/gitea/repo_test.go +++ b/gitea/repo_test.go @@ -61,6 +61,8 @@ func TestRepoMigrateAndLanguages(t *testing.T) { assert.True(t, repoG.Mirror) assert.False(t, repoG.Empty) assert.EqualValues(t, 1, repoG.Watchers) + var zeroTime time.Time + assert.NotEqual(t, zeroTime, repoG.MirrorUpdated) log.Println("== TestRepoLanguages ==") time.Sleep(time.Second)