Documentation
¶
Overview ¶
Package github is the Converse connector for GitHub: an issue or pull request comment that mentions the bot starts a turn, and the answer is a comment on the same issue. Subscribe the webhook to "Issue comments" and "Issues". GitHub has no buttons, so approvals use /approve, /reject, and /edit comments.
Index ¶
- Constants
- type Config
- type Connector
- func (c *Connector) Edit(ctx context.Context, ref converse.MessageRef, out converse.Outgoing) error
- func (c *Connector) Name() string
- func (c *Connector) React(ctx context.Context, ref converse.MessageRef, r converse.Reaction) error
- func (c *Connector) Send(ctx context.Context, to converse.Address, out converse.Outgoing) (converse.MessageRef, error)
- func (c *Connector) Webhook(s converse.Sink) http.Handler
Constants ¶
const DefaultAPIBase = "https://api.github.com"
DefaultAPIBase is GitHub's REST API.
const Platform = "github"
Platform is the connector's name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// WebhookSecret verifies X-Hub-Signature-256. Required.
WebhookSecret string
// Token is a GitHub App installation token or a fine-grained token
// that may write issue comments. Required.
Token string
// BotLogin is the account the bot comments as, such as
// "acme-assistant[bot]". Only comments that mention @BotLogin start a
// turn, and the bot's own comments never do. Required.
BotLogin string
// APIBase overrides DefaultAPIBase, such as a GitHub Enterprise URL.
APIBase string
HTTPClient *http.Client
}
Config configures the connector.
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector is the GitHub connector.