reporter

package
v0.0.783 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package reporter contains helpers for writing comments in scm providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Report

func Report(spc SCMProviderClient, reportTemplate *template.Template, lhj *v1alpha1.LighthouseJob, validTypes []job.PipelineKind) error

Report is creating/updating/removing report comments in the SCM provider based on the state of the provided LighthouseJob.

func ShouldReport

func ShouldReport(lhj *v1alpha1.LighthouseJob, validTypes []job.PipelineKind) bool

ShouldReport determines whether this LighthouseJob is of a type to be reporting back.

Types

type SCMProviderClient

type SCMProviderClient interface {
	BotName() (string, error)
	ListPullRequestComments(string, string, int) ([]*scm.Comment, error)
	CreateComment(string, string, int, bool, string) error
	DeleteComment(string, string, int, int, bool) error
	EditComment(string, string, int, int, string, bool) error
	QuoteAuthorForComment(string) string
}

SCMProviderClient provides a client interface to report job status updates through GitHub comments.

Jump to

Keyboard shortcuts

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