Fixes #2738 - Adds the /git/tags API endpoint (#7138)

* Fixes #2738 - /git/tags API

* proper URLs

* Adds function comments

* Updates swagger

* Removes newline from tag message

* Removes trailing newline from commit message

* Adds integration test

* Removed debugging

* Adds tests

* Fixes bug where multiple tags of same commit show wrong tag name

* Fix formatting

* Removes unused varaible

* Fix to annotated tag function names and response

* Update modules/git/repo_tag.go

Co-Authored-By: Lauris BH <lauris@nix.lv>

* Uses TagPrefix

* Changes per review, better error handling for getting tag and commit IDs

* Fix to getting commit ID

* Fix to getting commit ID

* Fix to getting commit ID

* Fix to getting commit ID
This commit is contained in:
Richard Mahn 2019-06-08 10:31:11 -04:00 committed by Lauris BH
parent 23a2ee3510
commit 8de0b0a3f0
16 changed files with 551 additions and 85 deletions

View file

@ -7,6 +7,7 @@ package git
import (
"bytes"
"sort"
"strings"
)
// Tag represents a Git tag.
@ -59,7 +60,7 @@ l:
}
nextline += eol + 1
case eol == 0:
tag.Message = string(data[nextline+1:])
tag.Message = strings.TrimRight(string(data[nextline+1:]), "\n")
break l
default:
break l