func MakeGithubStatusMessage(context string, state GithubState, URL, description string) Composer {
	return &githubStatusMessage{
		raw: GithubStatus{
			Context:     context,
			State:       state,
			URL:         URL,
			Description: description,
		},
	}
}
MakeGithubStatusMessage creates a composer for sending payloads to the Github Status
API without setting a priority
package message
import (
	"fmt"
	"net/url"
	"github.com/mongodb/grip/level"
)
type GithubState string
const (
	GithubStatePending = GithubState("pending")
	GithubStateSuccess = GithubState("success")
	GithubStateError   = GithubState("error")
	GithubStateFailure = GithubState("failure")
)
type GithubStatus struct {
	Owner string `bson:"owner,omitempty" json:"owner,omitempty" yaml:"owner,omitempty"`
	Repo  string `bson:"repo,omitempty" json:"repo,omitempty" yaml:"repo,omitempty"`
	Ref   string `bson:"ref,omitempty" json:"ref,omitempty" yaml:"ref,omitempty"`
	Context     string      `bson:"context" json:"context" yaml:"context"`
	State       GithubState `bson:"state" json:"state" yaml:"state"`
	URL         string      `bson:"url" json:"url" yaml:"url"`
	Description string      `bson:"description" json:"description" yaml:"description"`
}
func (p *GithubStatus) Valid() bool {
	ownerEmpty := len(p.Owner) == 0
	repoEmpty := len(p.Repo) == 0
	refLen := len(p.Ref) == 0
	if ownerEmpty != repoEmpty || repoEmpty != refLen {
		return false
	}
	switch p.State {
	case GithubStatePending, GithubStateSuccess, GithubStateError, GithubStateFailure:
	default:
		return false
	}
	_, err := url.Parse(p.URL)
	if err != nil || len(p.Context) == 0 {
		return false
	}
	return true
}
type githubStatusMessage struct {
	raw GithubStatus
	str string
	Base `bson:"metadata" json:"metadata" yaml:"metadata"`
}
func NewGithubStatusMessageWithRepo(p level.Priority, status GithubStatus) Composer {
	s := MakeGithubStatusMessageWithRepo(status)
	_ = s.SetPriority(p)
	return s
}
func MakeGithubStatusMessageWithRepo(status GithubStatus) Composer {
	return &githubStatusMessage{
		raw: status,
	}
}
func NewGithubStatusMessage(p level.Priority, context string, state GithubState, URL, description string) Composer {
	s := MakeGithubStatusMessage(context, state, URL, description)
	_ = s.SetPriority(p)
	return s
}