Documentation
¶
Index ¶
- Constants
- func RequestHttp(method string, uri string, header map[string]string, data interface{}) ([]byte, http.Header, error)
- type Base
- type Client
- type CommitStatusState
- type EventType
- type Head
- type PullRequest
- type PullRequestAction
- type PullRequestState
- type Push
- type Repository
- type Sender
- type Webhook
- type WebhookEntry
Constants ¶
View Source
const ( EventTypePullRequest = EventType("pull_request") EventTypePush = EventType("push") PullRequestStateOpen = PullRequestState("open") PullRequestStateClosed = PullRequestState("closed") PullRequestActionReOpen = PullRequestAction("reopened") PullRequestActionOpen = PullRequestAction("opened") PullRequestActionClose = PullRequestAction("closed") PullRequestActionSynchronize = PullRequestAction("synchronize") )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface {
// Webhooks
ListWebhook(integrationConfig *cicdv1.IntegrationConfig, c client.Client) ([]WebhookEntry, error)
RegisterWebhook(integrationConfig *cicdv1.IntegrationConfig, url string, c client.Client) error
DeleteWebhook(integrationConfig *cicdv1.IntegrationConfig, id int, c client.Client) error
ParseWebhook(*cicdv1.IntegrationConfig, http.Header, []byte) (Webhook, error)
// Commit Status
SetCommitStatus(integrationJob *cicdv1.IntegrationJob, integrationConfig *cicdv1.IntegrationConfig, context string, state CommitStatusState, description, targetUrl string, c client.Client) error
}
type CommitStatusState ¶
type CommitStatusState string
type PullRequest ¶
type PullRequest struct {
ID int
Title string
State PullRequestState
Action PullRequestAction
Sender Sender
URL string
Base Base
Head Head
}
type PullRequestAction ¶
type PullRequestAction string
type PullRequestState ¶
type PullRequestState string
type Repository ¶
type Webhook ¶
type Webhook struct {
EventType EventType
Repo Repository
Push *Push
PullRequest *PullRequest
Action string
}
Webhook is a common structure for git webhooks github-specific or gitlab-specific webhook bodies are converted to this structure before being consumed
type WebhookEntry ¶
Click to show internal directories.
Click to hide internal directories.