Adding GetBuildStatusesResponse

This commit is contained in:
gfleury 2020-03-18 16:48:33 -03:00
parent 14d4b869a5
commit dede03b917

View File

@ -449,6 +449,13 @@ func GetSSHKeysResponse(r *APIResponse) ([]SSHKey, error) {
return m, err
}
// GetBuildStatusResponse cast BuildStatus into structure
func GetBuildStatusesResponse(r *APIResponse) ([]BuildStatus, error) {
var m []BuildStatus
err := mapstructure.Decode(r.Values["values"], &m)
return m, err
}
// GetPullRequestResponse cast PullRequest into structure
func GetPullRequestResponse(r *APIResponse) (PullRequest, error) {
var m PullRequest