models

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Slack   = "slack"
	Webhook = "webhook"
)
View Source
const (
	OpenState   = "open"
	ClosedState = "closed"
)

Pull request states

Variables

View Source
var Valid = []string{Slack, Webhook}

Functions

This section is empty.

Types

type Config added in v1.3.1

type Config struct {
	Messages Messages `yaml:"messages"`
}

type Feathers added in v1.3.1

type Feathers struct {
	Teams  Teams  `yaml:"teams"`
	Config Config `yaml:"config"`
}

type Messages added in v1.3.1

type Messages struct {
	Subject string `yaml:"subject"`
}

type PullRequestEventDTO

type PullRequestEventDTO struct {
	PullRequestID int64
	PROwner       string
	RepoOwner     string
	RepoName      string
	Body          string
	PRNumber      int
	SHA           string
	Branch        string
	DefaultBranch string
}

PullRequestEventDTO is a data transfer object for the PullRequestEvent. It reduces the amount of data that is held by the service.

func MarshalPullRequestEvent

func MarshalPullRequestEvent(event *github.PullRequestEvent) *PullRequestEventDTO

MarshalPullRequestEvent marshals a github.PullRequestEvent into a PullRequestEventDTO

type ReleaseNote added in v1.1.1

type ReleaseNote struct {
	Teams   Teams
	Content string
}

type Team added in v1.3.1

type Team struct {
	Name        string   `yaml:"name"`
	APIKey      string   `yaml:"apiKey"`
	ContactType string   `yaml:"contactType"`
	Addresses   []string `yaml:"addresses"`
}

type Teams added in v1.3.1

type Teams []Team

func (Teams) Contains added in v1.3.2

func (ts Teams) Contains(teamNames ...string) error

func (Teams) GetAddressPool added in v1.3.2

func (ts Teams) GetAddressPool() map[string][]string

func (Teams) GetAllContactTypes added in v1.3.1

func (ts Teams) GetAllContactTypes() []string

func (Teams) GetAllTeamNames added in v1.3.1

func (ts Teams) GetAllTeamNames() []string

func (Teams) GetContactTypesByTeamNames added in v1.3.1

func (ts Teams) GetContactTypesByTeamNames(names ...string) []string

func (Teams) GetTeamsByNames added in v1.3.1

func (ts Teams) GetTeamsByNames(names ...string) Teams

Jump to

Keyboard shortcuts

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