github.com/web-platform-tests/wpt.fyi@v0.0.0-20240530210107-70cf978996f1/api/checks/routes.go (about)

     1  // Copyright 2018 The WPT Dashboard Project. All rights reserved.
     2  // Use of this source code is governed by a BSD-style license that can be
     3  // found in the LICENSE file.
     4  
     5  package checks
     6  
     7  import "github.com/web-platform-tests/wpt.fyi/shared"
     8  
     9  // RegisterRoutes adds route handlers for webhooks.
    10  func RegisterRoutes() {
    11  	// GitHub webhook for creating custom status checks.
    12  	shared.AddRoute("/api/webhook/check", "api-webhook-check", checkWebhookHandler)
    13  
    14  	// Endpoint for computing outcome and updating any checks for the given commit.
    15  	// When scheduling updates, we call this endpoint from the check-processing TaskQueue.
    16  	shared.AddRoute("/api/checks/{commit}", "checks-updater", updateCheckHandler)
    17  }