common

package
v0.0.0-...-d76356b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2018 License: EPL-1.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const BitbarManifestTemplate = "{{printf \"\u2766\"}} | color={{colorIcon .}}\n" +
	"---\n" +
	"{{range $repo, $entries := .Entries}}" +
	"" +
	"{{$repo}} | size=20\n" +
	"" +
	"{{$length := len $entries}}" +
	"{{if eq $length 0}}" +
	"No PRs found... | alternative=true\n" +
	"{{end}}" +
	"" +
	"{{range $entry := $entries}}" +
	"{{$entry.Pr.Title}} | href={{$entry.Pr.URL}} color={{colorPr $entry}}\n" +
	"{{range $status := $entry.Statuses}}" +
	"-- {{$status.Name}} | href={{$status.URL}} color={{colorStatus $status}}\n" +
	"{{end}}" +
	"{{end}}" +
	"" +
	"{{end}}" +
	"---\n" +
	"SoFi Prowler v{{.Version}}; loaded in: {{.Duration}} | alternate=true\n" +
	"---\n"

Variables

This section is empty.

Functions

func ColorIcon

func ColorIcon(manifest *Manifest) string

func ColorPr

func ColorPr(entry *Entry) string

func ColorStatus

func ColorStatus(status *services.Status) string

func LoadConfig

func LoadConfig(path string) (*v1.Config, error)

Types

type Entry

type Entry struct {
	Pr       *vcs.PullRequest
	Statuses []*services.Status
}

type Manifest

type Manifest struct {
	Entries  map[string][]*Entry
	Version  string
	Duration string
}

func RunIntegration

func RunIntegration(config *config.Config) (*Manifest, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL