func (r *CreateCommitReq) Rel(link string, resp *CreateCommitResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
/*
Rel updates this request to point to a relative link from resp. Returns false if
the link does not exist. Handy for paging.
package git
import (
	"context"
	"fmt"
	components "github.com/willabides/octo-go/components"
	requests "github.com/willabides/octo-go/requests"
	"net/http"
	"net/url"
	"strconv"
)
func CreateBlob(ctx context.Context, req *CreateBlobReq, opt ...requests.Option) (*CreateBlobResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CreateBlobReq)
	}
	resp := &CreateBlobResponse{}
	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) CreateBlob(ctx context.Context, req *CreateBlobReq, opt ...requests.Option) (*CreateBlobResponse, error) {
	return CreateBlob(ctx, req, append(c, opt...)...)
}
type CreateBlobReq struct {
	_url        string
	Owner       string
	Repo        string
	RequestBody CreateBlobReqBody
}
func (r *CreateBlobReq) 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/git/blobs", r.Owner, r.Repo),
	})
}
func (r *CreateBlobReq) Rel(link string, resp *CreateBlobResponse) bool {
	u := getRelLink(resp.HTTPResponse(), link)
	if u == "" {
		return false
	}
	r._url = u
	return true
}
type CreateBlobReqBody struct {
	Content *string `json:"content"`
	Encoding *string `json:"encoding,omitempty"`
}
type CreateBlobResponse struct {
	httpResponse *http.Response
	Data         components.ShortBlob
}
func (r *CreateBlobResponse) HTTPResponse() *http.Response {
	return r.httpResponse
}
func (r *CreateBlobResponse) 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 CreateCommit(ctx context.Context, req *CreateCommitReq, opt ...requests.Option) (*CreateCommitResponse, error) {
	opts := requests.BuildOptions(opt...)
	if req == nil {
		req = new(CreateCommitReq)
	}
	resp := &CreateCommitResponse{}
	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) CreateCommit(ctx context.Context, req *CreateCommitReq, opt ...requests.Option) (*CreateCommitResponse, error) {
	return CreateCommit(ctx, req, append(c, opt...)...)
}
type CreateCommitReq struct {
	_url        string
	Owner       string
	Repo        string
	RequestBody CreateCommitReqBody
}
func (r *CreateCommitReq) 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/git/commits", r.Owner, r.Repo),
	})
}