func (g githubRelease) buildBody(changelog *types.Changelog) ([]byte, error) {
	body, err := tmplh.Build("github-release-template", g.config.RELEASE.TEMPLATE, changelog)
	if err != nil {
		return []byte{}, err
	}
	r := githubReleasePayload{
		g.config.RELEASE.TAGNAME,
		g.config.RELEASE.TARGETCOMMITISH,
		g.config.RELEASE.NAME,
		body,
		g.config.RELEASE.DRAFT,
		g.config.RELEASE.PRERELEASE,
	}
	return json.Marshal(r)
}
buildBody creates a request body from changelog
package senders
import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
	"github.com/antham/chyle/chyle/apih"
	"github.com/antham/chyle/chyle/errh"
	"github.com/antham/chyle/chyle/tmplh"
	"github.com/antham/chyle/chyle/types"
)
type githubReleaseConfig struct {
	REPOSITORY struct {
		NAME string
	}
	CREDENTIALS struct {
		OAUTHTOKEN string
		OWNER      string
	}
	RELEASE struct {
		DRAFT           bool
		UPDATE          bool
		PRERELEASE      bool
		NAME            string
		TAGNAME         string
		TARGETCOMMITISH string
		TEMPLATE        string
	}
}
type githubReleasePayload struct {
	TagName         string `json:"tag_name"`
	TargetCommitish string `json:"target_commitish,omitempty"`
	Name            string `json:"name,omitempty"`
	Body            string `json:"body,omitempty"`
	Draft           bool   `json:"draft,omitempty"`
	PreRelease      bool   `json:"prerelease,omitempty"`
}
func newGithubRelease(config githubReleaseConfig) Sender {
	return githubRelease{&http.Client{}, config}
}
type githubRelease struct {
	client *http.Client
	config githubReleaseConfig
}