Scalingo/go-scalingo

SCMRepoLinkService Manual Deploy response is not parsed

Closed this issue · 0 comments

The API states that the ManualDeploy endpoint from SCMRepoLink returns a deployment with its ID.

https://developers.scalingo.com/scm_repo_link#manual-deploy

However, the SDK only returns an error, the response is not parsed.

func (c *Client) SCMRepoLinkManualDeploy(ctx context.Context, app, branch string) error {
res, err := c.ScalingoAPI().Do(ctx, &http.APIRequest{
Method: "POST",
Endpoint: "/apps/" + app + "/scm_repo_link/manual_deploy",
Expected: http.Statuses{200},
Params: map[string]string{"branch": branch},
})
if err != nil {
return errgo.Notef(err, "fail to trigger manual app deployment")
}
defer res.Body.Close()
return nil
}