func NewBranch(name string, commits []CommitRef) Branch {
	return Branch{
		Name:       name,
		CommitRefs: commits,
	}
}
NewBranch returns a new Branch object
package repository
import (
	"net/url"
	"path"
	"regexp"
)
const (
	Protocol      = "((?P<protocol>https?|git)(?:://|@))?"
	VCSName       = "(?P<vcs>[^/:]+)"
	OrgName       = "(?P<org>[^/.]+)"
	RepoName      = "(?P<repo>[^/.]+)"
	RepoExtension = "(?:.git)?"
	VCSRegex  = "^" + Protocol + VCSName + "/?$"
	OrgRegex  = "^" + Protocol + VCSName + "[/:]" + OrgName + "/?$"
	RepoRegex = "^" + Protocol + VCSName + "[/:]" + OrgName + "/" + RepoName + RepoExtension + "$"
)
type Organization struct {
	Alias string
	VCS   string
	Name  string
}
func NewOrganization(alias string, url string) *Organization {
	for _, regex := range []string{
		RepoRegex,
		OrgRegex,
		VCSRegex,
	} {
		if matched, err := regexp.MatchString(regex, url); nil == err && matched {
			match := getMatchGroups(regex, url)
			if "" == alias {
				alias = match["org"]
			}
			return &Organization{
				Alias: alias,
				VCS:   match["vcs"],
				Name:  match["org"],
			}
		}
	}
	return nil
}
const (
	CommitStatusError    = "ERROR"
	CommitStatusExpected = "EXPECTED"
	CommitStatusFAilure  = "FAILURE"
	CommitStatusPending  = "PENDING"
	CommitStatusSuccess  = "SUCCESS"
)
type Commit struct {
	URL                    string
	Checks                 []Check
	Status                 string
	IsSigned               bool
	AssociatedPullRequests []PullRequest
}
type Check struct {
	Status     string
	Conclusion string
}
func NewCheck(status string, conclusion string) Check {
	return Check{
		Status:     status,
		Conclusion: conclusion,
	}
}
type App struct {
	Name string
	URL  string
}
func NewCommit(commitURL string, checks []Check, commitStatus string, isSigned bool, associatedPullRequests []PullRequest) Commit {
	return Commit{
		URL:                    commitURL,
		Checks:                 checks,
		Status:                 commitStatus,
		IsSigned:               isSigned,
		AssociatedPullRequests: associatedPullRequests,
	}
}
type Branch struct {
	Name       string
	CommitRefs []CommitRef
}