Merge pull request #60 from louisphilippereid/get-projects-response

Added GetProjectsResponse to unmarshall get projects response
This commit is contained in:
George Fleury 2023-08-30 14:10:38 +02:00 committed by GitHub
commit 6e30c5760c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -561,6 +561,12 @@ func (k *SSHKey) String() string {
return strings.Join(parts, " ")
}
func GetProjectsResponse(r *APIResponse) ([]Project, error) {
var m []Project
err := mapstructure.Decode(r.Values["values"], &m)
return m, err
}
// GetCommitsResponse cast Commits into structure
func GetCommitsResponse(r *APIResponse) ([]Commit, error) {
var m []Commit