func NewMessage(job *database.Job, event string) *Message {
	return &Message{
		Name:           job.Name,
		Email:          job.Email,
		Event:          event,
		RepositoryName: job.Repository.Name,
		Branch:         job.Branch,
		Status:         job.Status(),
		URL:            job.URL(),
	}
}
NewMessage converts a job and event type to a message that can be send
through a websocket.
package websocket
import (
	"github.com/fallenhitokiri/leeroyci/database"
)
type Message struct {
	Name           string `json:"name"`
	Email          string `json:"email"`
	Event          string `json:"event"`
	RepositoryName string `json:"repository_name"`
	Branch         string `json:"branch"`
	Status         string `json:"status"`
	URL            string `json:"url"`
}