webhook

package
v0.0.0-...-5ce4db1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckRun

type CheckRun struct {
	Common
	CheckRun struct {
		Name   string
		Output struct {
			Title   string
			Summary string
		}
		CheckSuite struct {
			App struct {
				Name      string
				AvatarURL string `json:"avatar_url"`
			}
			HeadBranch string `json:"head_branch"`
		} `json:"check_suite"`
	} `json:"check_run"`
}

func (CheckRun) SummarizeForTeams

func (ev CheckRun) SummarizeForTeams(p *message.Printer) *teams.Request

type Common

type Common struct {
	Action string
	Sender struct {
		Login     string
		AvatarURL string `json:"avatar_url"`
	}
	Repository struct {
		FullName      string `json:"full_name"`
		DefaultBranch string `json:"default_branch"`
		URL           string `json:"html_url"`
	}
	Organization struct {
		Login string
	}
	Ref        string
	HeadCommit struct {
		ID  string
		URL string
	} `json:"head_commit"`
}

type Create

type Create struct {
	Common
	RefType string `json:"ref_type"`
}

func (Create) SummarizeForTeams

func (ev Create) SummarizeForTeams(p *message.Printer) *teams.Request

type Delete

type Delete struct {
	Common
	RefType string `json:"ref_type"`
}

func (Delete) SummarizeForTeams

func (ev Delete) SummarizeForTeams(p *message.Printer) *teams.Request

type JobStatus

type JobStatus struct {
	Common
	JobName   string
	JobStatus string
	JobURL    string
}

func (JobStatus) SummarizeForTeams

func (ev JobStatus) SummarizeForTeams(p *message.Printer) *teams.Request

type PullRequest

type PullRequest struct {
	Common
	PullRequest struct {
		Number int
		Title  string
		Draft  bool
		Head   struct {
			Ref string
		}
		Base struct {
			Ref string
		}
		URL    string `json:"html_url"`
		Body   string
		Merged bool
	} `json:"pull_request"`
}

func (PullRequest) SummarizeForTeams

func (ev PullRequest) SummarizeForTeams(p *message.Printer) *teams.Request

type PullRequestReview

type PullRequestReview struct {
	Common
	PullRequest struct {
		Number int
		Title  string
		URL    string `json:"html_url"`
	} `json:"pull_request"`
	Review struct {
		State string
		URL   string `json:"html_url"`
	}
}

func (*PullRequestReview) SummarizeForTeams

func (ev *PullRequestReview) SummarizeForTeams(p *message.Printer) *teams.Request

type PullRequestReviewComment

type PullRequestReviewComment struct{}

func (PullRequestReviewComment) SummarizeForTeams

func (ev PullRequestReviewComment) SummarizeForTeams(p *message.Printer) *teams.Request

type Push

type Push struct {
	Common
	Before, After string
	CompareURL    string `json:"compare_url"`
	Commits       []struct {
		ID      string
		URL     string
		Message string
		Author  struct {
			Name string
		}
		Distinct bool
	}
	Pusher struct {
		Name string
	}
	Forced bool
}

func (Push) SummarizeForTeams

func (ev Push) SummarizeForTeams(p *message.Printer) *teams.Request

type Summarizer

type Summarizer interface {
	SummarizeForTeams(pr *message.Printer) *teams.Request
}

func ParseFile

func ParseFile(ctx context.Context, event string, payloadPath string) (Summarizer, error)

func ParseString

func ParseString(ctx context.Context, event string, payload string) (Summarizer, error)

func ParseWorkflow

func ParseWorkflow(ctx context.Context) (Summarizer, error)

func Report

func Report(ctx context.Context, workflow, status, runID string, payload io.Reader) (Summarizer, error)

func ReportFile

func ReportFile(ctx context.Context, workflow, status, runID, payloadPath string) (Summarizer, error)

func ReportString

func ReportString(ctx context.Context, workflow, status, runID, payload string) (Summarizer, error)

func ReportWorkflowStatus

func ReportWorkflowStatus(ctx context.Context, status string) (Summarizer, error)

Jump to

Keyboard shortcuts

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