Documentation
¶
Index ¶
- Constants
- func NewClient(ctx core.AppInstallationContext, ghAppID int64, installationID string) (*github.Client, error)
- type Configuration
- type GitHub
- func (g *GitHub) CleanupWebhook(ctx core.AppInstallationContext, options core.WebhookOptions) error
- func (g *GitHub) CompareWebhookConfig(a, b any) (bool, error)
- func (g *GitHub) Components() []core.Component
- func (g *GitHub) Configuration() []configuration.Field
- func (g *GitHub) Description() string
- func (g *GitHub) HandleRequest(ctx core.HTTPRequestContext)
- func (g *GitHub) Icon() string
- func (g *GitHub) Label() string
- func (g *GitHub) Name() string
- func (g *GitHub) SetupWebhook(ctx core.AppInstallationContext, options core.WebhookOptions) (any, error)
- func (g *GitHub) Sync(ctx core.SyncContext) error
- func (g *GitHub) Triggers() []core.Trigger
- type GitHubAppData
- type GitHubAppMetadata
- type Metadata
- type OnIssue
- func (i *OnIssue) Actions() []core.Action
- func (i *OnIssue) Color() string
- func (i *OnIssue) Configuration() []configuration.Field
- func (i *OnIssue) Description() string
- func (i *OnIssue) HandleAction(ctx core.TriggerActionContext) error
- func (i *OnIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (i *OnIssue) Icon() string
- func (i *OnIssue) Label() string
- func (i *OnIssue) Name() string
- func (i *OnIssue) Setup(ctx core.TriggerContext) error
- type OnIssueConfiguration
- type OnIssueMetadata
- type OnPullRequest
- func (p *OnPullRequest) Actions() []core.Action
- func (p *OnPullRequest) Color() string
- func (p *OnPullRequest) Configuration() []configuration.Field
- func (p *OnPullRequest) Description() string
- func (p *OnPullRequest) HandleAction(ctx core.TriggerActionContext) error
- func (p *OnPullRequest) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (p *OnPullRequest) Icon() string
- func (p *OnPullRequest) Label() string
- func (p *OnPullRequest) Name() string
- func (p *OnPullRequest) Setup(ctx core.TriggerContext) error
- type OnPullRequestConfiguration
- type OnPullRequestMetadata
- type OnPush
- func (p *OnPush) Actions() []core.Action
- func (p *OnPush) Color() string
- func (p *OnPush) Configuration() []configuration.Field
- func (p *OnPush) Description() string
- func (p *OnPush) HandleAction(ctx core.TriggerActionContext) error
- func (p *OnPush) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (p *OnPush) Icon() string
- func (p *OnPush) Label() string
- func (p *OnPush) Name() string
- func (p *OnPush) Setup(ctx core.TriggerContext) error
- type OnPushConfiguration
- type OnPushMetadata
- type OnRelease
- func (r *OnRelease) Actions() []core.Action
- func (r *OnRelease) Color() string
- func (r *OnRelease) Configuration() []configuration.Field
- func (r *OnRelease) Description() string
- func (r *OnRelease) HandleAction(ctx core.TriggerActionContext) error
- func (r *OnRelease) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (r *OnRelease) Icon() string
- func (r *OnRelease) Label() string
- func (r *OnRelease) Name() string
- func (r *OnRelease) Setup(ctx core.TriggerContext) error
- type OnReleaseConfiguration
- type OnReleaseMetadata
- type Repository
- type Webhook
- type WebhookConfiguration
Constants ¶
View Source
const ( GitHubAppPEM = "pem" GitHubAppClientSecret = "clientSecret" GitHubAppWebhookSecret = "webhookSecret" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct {
Organization string `json:"organization"`
}
type GitHub ¶
type GitHub struct {
}
func (*GitHub) CleanupWebhook ¶
func (g *GitHub) CleanupWebhook(ctx core.AppInstallationContext, options core.WebhookOptions) error
func (*GitHub) Components ¶
func (*GitHub) Configuration ¶
func (g *GitHub) Configuration() []configuration.Field
func (*GitHub) Description ¶
func (*GitHub) HandleRequest ¶
func (g *GitHub) HandleRequest(ctx core.HTTPRequestContext)
func (*GitHub) SetupWebhook ¶
func (g *GitHub) SetupWebhook(ctx core.AppInstallationContext, options core.WebhookOptions) (any, error)
type GitHubAppData ¶
type GitHubAppData struct {
ID int64 `mapstructure:"id" json:"id"`
Slug string `mapstructure:"slug" json:"slug"`
ClientID string `mapstructure:"client_id" json:"client_id"`
ClientSecret string `mapstructure:"client_secret" json:"client_secret"`
WebhookSecret string `mapstructure:"webhook_secret" json:"webhook_secret"`
PEM string `mapstructure:"pem" json:"pem"`
}
* This is the response GitHub sends back after the GitHub app is created. * NOTE: this contains sensitive data, so we should not save this as part * of the installation metadata.
type GitHubAppMetadata ¶
type Metadata ¶
type Metadata struct {
InstallationID string `mapstructure:"installationId" json:"installationId"`
State string `mapstructure:"state" json:"state"`
Owner string `mapstructure:"owner" json:"owner"`
Repositories []Repository `mapstructure:"repositories" json:"repositories"`
GitHubApp GitHubAppMetadata `mapstructure:"githubApp" json:"githubApp"`
}
type OnIssue ¶
type OnIssue struct{}
func (*OnIssue) Configuration ¶
func (i *OnIssue) Configuration() []configuration.Field
func (*OnIssue) Description ¶
func (*OnIssue) HandleAction ¶
func (i *OnIssue) HandleAction(ctx core.TriggerActionContext) error
func (*OnIssue) HandleWebhook ¶
func (i *OnIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
type OnIssueConfiguration ¶
type OnIssueMetadata ¶
type OnIssueMetadata struct {
Repository *Repository `json:"repository"`
}
type OnPullRequest ¶
type OnPullRequest struct{}
func (*OnPullRequest) Actions ¶
func (p *OnPullRequest) Actions() []core.Action
func (*OnPullRequest) Color ¶
func (p *OnPullRequest) Color() string
func (*OnPullRequest) Configuration ¶
func (p *OnPullRequest) Configuration() []configuration.Field
func (*OnPullRequest) Description ¶
func (p *OnPullRequest) Description() string
func (*OnPullRequest) HandleAction ¶
func (p *OnPullRequest) HandleAction(ctx core.TriggerActionContext) error
func (*OnPullRequest) HandleWebhook ¶
func (p *OnPullRequest) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
func (*OnPullRequest) Icon ¶
func (p *OnPullRequest) Icon() string
func (*OnPullRequest) Label ¶
func (p *OnPullRequest) Label() string
func (*OnPullRequest) Name ¶
func (p *OnPullRequest) Name() string
func (*OnPullRequest) Setup ¶
func (p *OnPullRequest) Setup(ctx core.TriggerContext) error
type OnPullRequestMetadata ¶
type OnPullRequestMetadata struct {
Repository *Repository `json:"repository"`
}
type OnPush ¶
type OnPush struct{}
func (*OnPush) Configuration ¶
func (p *OnPush) Configuration() []configuration.Field
func (*OnPush) Description ¶
func (*OnPush) HandleAction ¶
func (p *OnPush) HandleAction(ctx core.TriggerActionContext) error
func (*OnPush) HandleWebhook ¶
func (p *OnPush) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
type OnPushConfiguration ¶
type OnPushConfiguration struct {
Repository string `json:"repository"`
Refs []configuration.Predicate `json:"refs"`
}
type OnPushMetadata ¶
type OnPushMetadata struct {
Repository *Repository `json:"repository"`
}
type OnRelease ¶
type OnRelease struct{}
func (*OnRelease) Configuration ¶
func (r *OnRelease) Configuration() []configuration.Field
func (*OnRelease) Description ¶
func (*OnRelease) HandleAction ¶
func (r *OnRelease) HandleAction(ctx core.TriggerActionContext) error
func (*OnRelease) HandleWebhook ¶
func (r *OnRelease) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
type OnReleaseConfiguration ¶
type OnReleaseMetadata ¶
type OnReleaseMetadata struct {
Repository *Repository `json:"repository"`
}
type Repository ¶
type WebhookConfiguration ¶
Click to show internal directories.
Click to hide internal directories.