1
0
mirror of https://github.com/gfleury/go-bitbucket-v1.git synced 2025-04-10 03:18:05 -05:00

Adding missing err check

This commit is contained in:
gfleury 2020-03-16 21:32:40 -03:00
parent d31cf4f36b
commit 4776448b1d

@ -587,7 +587,11 @@ Create a new pull request between two branches. The branches may be in the same
func (a *DefaultApiService) Create(projectKey, repositorySlug string, localVarOptionals map[string]interface{}) (*APIResponse, error) {
var pullRequest PullRequest
mapstructure.Decode(localVarOptionals, &pullRequest)
err := mapstructure.Decode(localVarOptionals, &pullRequest)
if err != nil {
return nil, err
}
return a.CreatePullRequest(projectKey, repositorySlug, pullRequest)
}