Update CommitMeta Struct (#434) (#437)

Update CommitMeta Struct (#434)

redo of cae72dca6a witch was lost

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/434
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>

Co-authored-by: 6543 <6543@noreply.gitea.io>
Reviewed-on: https://gitea.com/gitea/go-sdk/pulls/451
Reviewed-by: lafriks <lafriks@noreply.gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>
Co-Authored-By: 6543 <6543@obermui.de>
Co-Committed-By: 6543 <6543@obermui.de>
This commit is contained in:
6543 2020-11-10 06:08:23 +08:00
parent db609d2ab3
commit d713155833
2 changed files with 4 additions and 3 deletions

View file

@ -19,8 +19,9 @@ type Identity struct {
// CommitMeta contains meta information of a commit in terms of API.
type CommitMeta struct {
URL string `json:"url"`
SHA string `json:"sha"`
URL string `json:"url"`
SHA string `json:"sha"`
Created time.Time `json:"created"`
}
// CommitUser contains information of a user in the context of a commit.

View file

@ -66,7 +66,7 @@ func TestRepoMigrateAndLanguages(t *testing.T) {
assert.NoError(t, err)
assert.Len(t, lang, 2)
assert.True(t, 217441 < lang["Go"])
assert.EqualValues(t, 3578, lang["Makefile"])
assert.True(t, 3614 < lang["Makefile"] && 6000 > lang["Makefile"])
}
func TestSearchRepo(t *testing.T) {