Documentation ¶
Index ¶
- Constants
- Variables
- func CreateAllRuns(log shared.Logger, aeAPI shared.AppEngineAPI, sha, username, password string, ...) error
- func ExtractArtifactURLs(rootURL string, log shared.Logger, group *TaskGroupInfo, taskID string) (urlsByProduct map[string]ArtifactURLs, err error)
- func ParseTaskclusterURL(targetURL string) (rootURL, taskGroupID, taskID string)
- func RegisterRoutes()
- func ShouldProcessStatus(log shared.Logger, status *StatusEventPayload) bool
- type API
- type ArtifactURLs
- type EventInfo
- type StatusEventPayload
- type TaskGroupInfo
- type TaskInfo
Constants ¶
const AppID = int64(40788)
AppID is the ID of the Community-TC GitHub app.
Variables ¶
var ( // TaskNameRegex is based on task names in // https://github.com/web-platform-tests/wpt/blob/master/tools/ci/tc/tasks/test.yml. TaskNameRegex = regexp.MustCompile(`^wpt-([a-z_]+-[a-z]+)-([a-z]+(?:-[a-z]+)*)(?:-\d+)?$`) )
Functions ¶
func CreateAllRuns ¶
func CreateAllRuns( log shared.Logger, aeAPI shared.AppEngineAPI, sha, username, password string, urlsByProduct map[string]ArtifactURLs, labels []string) error
CreateAllRuns creates run entries in wpt.fyi for a set of products coming from Taskcluster.
func ExtractArtifactURLs ¶
func ExtractArtifactURLs(rootURL string, log shared.Logger, group *TaskGroupInfo, taskID string) ( urlsByProduct map[string]ArtifactURLs, err error)
ExtractArtifactURLs extracts the results and screenshot URLs for a set of tasks in a TaskGroupInfo.
func ParseTaskclusterURL ¶
ParseTaskclusterURL splits a given URL into its root URL, the Taskcluster group id, and an optional specific task ID.
func ShouldProcessStatus ¶
func ShouldProcessStatus(log shared.Logger, status *StatusEventPayload) bool
ShouldProcessStatus determines whether we are interested in processing a given StatusEventPayload or not.
Types ¶
type API ¶
type API interface { GetTaskGroupInfo(string, string) (*TaskGroupInfo, error) ListCheckRuns(owner string, repo string, checkSuiteID int64) ([]*github.CheckRun, error) }
API wraps externally provided methods so we can mock them for testing.
type ArtifactURLs ¶
ArtifactURLs holds the results and screenshot URLs for a Taskcluster run.
type EventInfo ¶
type EventInfo struct { Sha string RootURL string TaskID string Master bool Sender string Group *TaskGroupInfo }
EventInfo is an abstraction of a GitHub Status event, containing the necessary information for us to process the event in wpt.fyi.
func GetCheckSuiteEventInfo ¶
func GetCheckSuiteEventInfo(checkSuite github.CheckSuiteEvent, log shared.Logger, api API) (EventInfo, error)
GetCheckSuiteEventInfo turns a github.CheckSuiteEvent into an EventInfo struct.
func GetStatusEventInfo ¶
GetStatusEventInfo turns a StatusEventPayload into an EventInfo struct.
type StatusEventPayload ¶
type StatusEventPayload struct {
github.StatusEvent
}
StatusEventPayload wraps a github.StatusEvent so we can declare methods on it https://developer.github.com/v3/activity/events/types/#statusevent
func (StatusEventPayload) IsCompleted ¶
func (s StatusEventPayload) IsCompleted() bool
IsCompleted checks if a github.StatusEvent has completed.
func (StatusEventPayload) IsOnMaster ¶
func (s StatusEventPayload) IsOnMaster() bool
IsOnMaster checks if a github.StatusEvent affects the master branch.
func (StatusEventPayload) IsTaskcluster ¶
func (s StatusEventPayload) IsTaskcluster() bool
IsTaskcluster checks if a github.StatusEvent is from Taskcluster.
type TaskGroupInfo ¶
TaskGroupInfo is an abstraction of a Taskcluster task group, containing the necessary information for us to process the group in wpt.fyi.
Directories ¶
Path | Synopsis |
---|---|
Package mock_taskcluster is a generated GoMock package.
|
Package mock_taskcluster is a generated GoMock package. |