Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶
IsNotFound returns true if the error represents a NotFound response from an upstream service.
Types ¶
type SCM ¶
type SCM interface { // ParseWebhookRequest returns the webhook payload. ParseWebhookRequest(req *http.Request) (scm.Webhook, error) // FileContents returns the contents of a file within a repo. FileContents(ctx context.Context, repo, path, ref string) ([]byte, error) // CreateStatus creates a new commit status for the repo/commit combination. CreateStatus(ctx context.Context, repo, commit string, s *scm.StatusInput) error }
SCM is a wrapper around go-scm's Client implementation.
type SCMClient ¶
type SCMClient struct {
// contains filtered or unexported fields
}
SCMClient is a wrapper for the go-scm scm.Client with a simplified API.
func (*SCMClient) CreateStatus ¶ added in v0.2.0
func (c *SCMClient) CreateStatus(ctx context.Context, repo, commit string, s *scm.StatusInput) error
CreateStatus creates a commit status.
If an HTTP error is returned by the upstream service, an error with the response status code is returned.
func (*SCMClient) FileContents ¶
FileContents reads the specific revision of a file from a repository.
If an HTTP error is returned by the upstream service, an error with the response status code is returned.
Click to show internal directories.
Click to hide internal directories.