Fix git.parseTagData (#14105)

* Fix git.parseTagData()
close #14092

* Add Test

* add message to test

* limit readers

* git tag -m trims and terminates with a newline

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
6543
2020-12-22 20:44:25 +00:00
committed by GitHub
parent 30edcd5c71
commit 27fa4814b8
4 changed files with 81 additions and 5 deletions

View File

@ -50,7 +50,7 @@ func TestAPIGitTags(t *testing.T) {
assert.Equal(t, aTagName, tag.Tag)
assert.Equal(t, aTag.ID.String(), tag.SHA)
assert.Equal(t, commit.ID.String(), tag.Object.SHA)
assert.Equal(t, aTagMessage, tag.Message)
assert.Equal(t, aTagMessage+"\n", tag.Message)
assert.Equal(t, user.Name, tag.Tagger.Name)
assert.Equal(t, user.Email, tag.Tagger.Email)
assert.Equal(t, util.URLJoin(repo.APIURL(), "git/tags", aTag.ID.String()), tag.URL)