func CreateLabel(ctx context.Context, req *CreateLabelReq, opt ...requests.Option) (*CreateLabelResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CreateLabelReq)
	}
	resp := &CreateLabelResponse{}
	httpReq, err := req.HTTPRequest(ctx, opt...)
	if err != nil {
		return nil, err
	}
	r, err := opts.HttpClient().Do(httpReq)
	if err != nil {
		return nil, err
	}
	err = resp.ReadResponse(r)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
/*
CreateLabel performs requests for "issues/create-label"

Create a label.

POST /repos/{owner}/{repo}/labels

https://developer.github.com/v3/issues/labels/#create-a-label
package issues
import (
	"context"
	"fmt"
	components "github.com/willabides/octo-go/components"
	requests "github.com/willabides/octo-go/requests"
	"net/http"
	"net/url"
	"strconv"
)
func AddAssignees(ctx context.Context, req *AddAssigneesReq, opt ...requests.Option) (*AddAssigneesResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(AddAssigneesReq)
	}
	resp := &AddAssigneesResponse{}
	httpReq, err := req.HTTPRequest(ctx, opt...)
	if err != nil {
		return nil, err
	}
	r, err := opts.HttpClient().Do(httpReq)
	if err != nil {
		return nil, err
	}
	err = resp.ReadResponse(r)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
func (c Client) AddAssignees(ctx context.Context, req *AddAssigneesReq, opt ...requests.Option) (*AddAssigneesResponse, error) {
	return AddAssignees(ctx, req, append(c, opt...)...)
}
type AddAssigneesReq struct {
	_url  string
	Owner string
	Repo  string
	IssueNumber int64
	RequestBody AddAssigneesReqBody
}
func (r *AddAssigneesReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		Body:        r.RequestBody,
		ExplicitURL: r._url,
		HeaderVals: map[string]*string{
			"accept":       strPtr("application/json"),
			"content-type": strPtr("application/json"),
		},
		Method:  "POST",
		Options: opt,
		URLPath: fmt.Sprintf("/repos/%v/%v/issues/%v/assignees", r.Owner, r.Repo, r.IssueNumber),
	})
}
func (r *AddAssigneesReq) Rel(link string, resp *AddAssigneesResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type AddAssigneesReqBody struct {
	Assignees []string `json:"assignees,omitempty"`
}
type AddAssigneesResponse struct {
	httpResponse *http.Response
	Data         components.IssueSimple
}
func (r *AddAssigneesResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *AddAssigneesResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{201})
	if err != nil {
		return err
	}
	if intInSlice(resp.StatusCode, []int{201}) {
		err = unmarshalResponseBody(resp, &r.Data)
		if err != nil {
			return err
		}
	}
	return nil
}
func AddLabels(ctx context.Context, req *AddLabelsReq, opt ...requests.Option) (*AddLabelsResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(AddLabelsReq)
	}
	resp := &AddLabelsResponse{}
	httpReq, err := req.HTTPRequest(ctx, opt...)
	if err != nil {
		return nil, err
	}
	r, err := opts.HttpClient().Do(httpReq)
	if err != nil {
		return nil, err
	}
	err = resp.ReadResponse(r)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
func (c Client) AddLabels(ctx context.Context, req *AddLabelsReq, opt ...requests.Option) (*AddLabelsResponse, error) {
	return AddLabels(ctx, req, append(c, opt...)...)
}
type AddLabelsReq struct {
	_url  string
	Owner string
	Repo  string
	IssueNumber int64
	RequestBody AddLabelsReqBody
}
func (r *AddLabelsReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		Body:        r.RequestBody,
		ExplicitURL: r._url,
		HeaderVals: map[string]*string{
			"accept":       strPtr("application/json"),
			"content-type": strPtr("application/json"),
		},
		Method:  "POST",
		Options: opt,
		URLPath: fmt.Sprintf("/repos/%v/%v/issues/%v/labels", r.Owner, r.Repo, r.IssueNumber),
	})
}
func (r *AddLabelsReq) Rel(link string, resp *AddLabelsResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type AddLabelsReqBody struct {
	Labels []string `json:"labels"`
}
type AddLabelsResponse struct {
	httpResponse *http.Response
	Data         []components.Label
}
func (r *AddLabelsResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *AddLabelsResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{200})
	if err != nil {
		return err
	}
	if intInSlice(resp.StatusCode, []int{200}) {
		err = unmarshalResponseBody(resp, &r.Data)
		if err != nil {
			return err
		}
	}
	return nil
}
func CheckUserCanBeAssigned(ctx context.Context, req *CheckUserCanBeAssignedReq, opt ...requests.Option) (*CheckUserCanBeAssignedResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CheckUserCanBeAssignedReq)
	}
	resp := &CheckUserCanBeAssignedResponse{}
	httpReq, err := req.HTTPRequest(ctx, opt...)
	if err != nil {
		return nil, err
	}
	r, err := opts.HttpClient().Do(httpReq)
	if err != nil {
		return nil, err
	}
	err = resp.ReadResponse(r)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
func (c Client) CheckUserCanBeAssigned(ctx context.Context, req *CheckUserCanBeAssignedReq, opt ...requests.Option) (*CheckUserCanBeAssignedResponse, error) {
	return CheckUserCanBeAssigned(ctx, req, append(c, opt...)...)
}
type CheckUserCanBeAssignedReq struct {
	_url  string
	Owner string
	Repo  string
	Assignee string
}
func (r *CheckUserCanBeAssignedReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		ExplicitURL: r._url,
		Method:      "GET",
		Options:     opt,
		URLPath:     fmt.Sprintf("/repos/%v/%v/assignees/%v", r.Owner, r.Repo, r.Assignee),
	})
}
func (r *CheckUserCanBeAssignedReq) Rel(link string, resp *CheckUserCanBeAssignedResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CheckUserCanBeAssignedResponse struct {
	httpResponse *http.Response
	Data         bool
}
func (r *CheckUserCanBeAssignedResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CheckUserCanBeAssignedResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{204, 404})
	if err != nil {
		return err
	}
	err = setBoolResult(resp, &r.Data)
	if err != nil {
		return err
	}
	return nil
}
func Create(ctx context.Context, req *CreateReq, opt ...requests.Option) (*CreateResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CreateReq)
	}
	resp := &CreateResponse{}
	httpReq, err := req.HTTPRequest(ctx, opt...)
	if err != nil {
		return nil, err
	}
	r, err := opts.HttpClient().Do(httpReq)
	if err != nil {
		return nil, err
	}
	err = resp.ReadResponse(r)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
func (c Client) Create(ctx context.Context, req *CreateReq, opt ...requests.Option) (*CreateResponse, error) {
	return Create(ctx, req, append(c, opt...)...)
}
type CreateReq struct {
	_url        string
	Owner       string
	Repo        string
	RequestBody CreateReqBody
}
func (r *CreateReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		Body:        r.RequestBody,
		ExplicitURL: r._url,
		HeaderVals: map[string]*string{
			"accept":       strPtr("application/json"),
			"content-type": strPtr("application/json"),
		},
		Method:  "POST",
		Options: opt,
		URLPath: fmt.Sprintf("/repos/%v/%v/issues", r.Owner, r.Repo),
	})
}
func (r *CreateReq) Rel(link string, resp *CreateResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CreateReqBody struct {
	Assignee *string `json:"assignee,omitempty"`
	Assignees []string `json:"assignees,omitempty"`
	Body *string `json:"body,omitempty"`
	Labels []string `json:"labels,omitempty"`
	Milestone *int64 `json:"milestone,omitempty"`
	Title *string `json:"title"`
}
type CreateResponse struct {
	httpResponse *http.Response
	Data         components.Issue
}
func (r *CreateResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CreateResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{201})
	if err != nil {
		return err
	}
	if intInSlice(resp.StatusCode, []int{201}) {
		err = unmarshalResponseBody(resp, &r.Data)
		if err != nil {
			return err
		}
	}
	return nil
}
func CreateComment(ctx context.Context, req *CreateCommentReq, opt ...requests.Option) (*CreateCommentResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CreateCommentReq)
	}
	resp := &CreateCommentResponse{}
	httpReq, err := req.HTTPRequest(ctx, opt...)
	if err != nil {
		return nil, err
	}
	r, err := opts.HttpClient().Do(httpReq)
	if err != nil {
		return nil, err
	}
	err = resp.ReadResponse(r)
	if err != nil {
		return nil, err
	}
	return resp, nil
}
func (c Client) CreateComment(ctx context.Context, req *CreateCommentReq, opt ...requests.Option) (*CreateCommentResponse, error) {
	return CreateComment(ctx, req, append(c, opt...)...)
}
type CreateCommentReq struct {
	_url  string
	Owner string
	Repo  string
	IssueNumber int64
	RequestBody CreateCommentReqBody
}
func (r *CreateCommentReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error) {
	return buildHTTPRequest(ctx, buildHTTPRequestOptions{
		Body:        r.RequestBody,
		ExplicitURL: r._url,
		HeaderVals: map[string]*string{
			"accept":       strPtr("application/json"),
			"content-type": strPtr("application/json"),
		},
		Method:  "POST",
		Options: opt,
		URLPath: fmt.Sprintf("/repos/%v/%v/issues/%v/comments", r.Owner, r.Repo, r.IssueNumber),
	})
}
func (r *CreateCommentReq) Rel(link string, resp *CreateCommentResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CreateCommentReqBody struct {
	Body *string `json:"body"`
}
type CreateCommentResponse struct {
	httpResponse *http.Response
	Data         components.IssueComment
}
func (r *CreateCommentResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CreateCommentResponse) ReadResponse(resp *http.Response) error {
	r.httpResponse = resp
	err := responseErrorCheck(resp, []int{201})
	if err != nil {
		return err
	}
	if intInSlice(resp.StatusCode, []int{201}) {
		err = unmarshalResponseBody(resp, &r.Data)
		if err != nil {
			return err
		}
	}
	return nil
}