From b2f8d2ec4070d3535b493308749e1c1f5c6c8e55 Mon Sep 17 00:00:00 2001 From: Victor Castell Date: Wed, 6 May 2015 17:52:54 +0200 Subject: [PATCH] use *[]string for DeploymentRequest.RequiredContexts There's no way of serializing/requesting an empty required_contexts that is needed for bypassing the commit status checks for the ref. It's a breaking change but will allow to serialize an empty array and omit empty value as expected. --- github/repos_deployments.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/github/repos_deployments.go b/github/repos_deployments.go index 1a1ae95..77c7949 100644 --- a/github/repos_deployments.go +++ b/github/repos_deployments.go @@ -27,13 +27,13 @@ type Deployment struct { // DeploymentRequest represents a deployment request type DeploymentRequest struct { - Ref *string `json:"ref,omitempty"` - Task *string `json:"task,omitempty"` - AutoMerge *bool `json:"auto_merge,omitempty"` - RequiredContexts []string `json:"required_contexts,omitempty"` - Payload *string `json:"payload,omitempty"` - Environment *string `json:"environment,omitempty"` - Description *string `json:"description,omitempty"` + Ref *string `json:"ref,omitempty"` + Task *string `json:"task,omitempty"` + AutoMerge *bool `json:"auto_merge,omitempty"` + RequiredContexts *[]string `json:"required_contexts,omitempty"` + Payload *string `json:"payload,omitempty"` + Environment *string `json:"environment,omitempty"` + Description *string `json:"description,omitempty"` } // DeploymentsListOptions specifies the optional parameters to the