github

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2026 License: Apache-2.0, MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
const DefaultAPIBase = "https://api.github.com"

DefaultAPIBase is GitHub's REST API.

View Source
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.

func New

func New(cfg Config) *Connector

New returns a GitHub connector.

func (*Connector) Edit

Edit implements converse.Editor for comments.

func (*Connector) Name

func (c *Connector) Name() string

Name implements converse.Connector.

func (*Connector) React

React implements converse.Reactor on a comment or an issue.

func (*Connector) Send

Send implements converse.Connector: a comment on the issue or pull request.

func (*Connector) Webhook

func (c *Connector) Webhook(s converse.Sink) http.Handler

Webhook implements converse.Connector. It verifies X-Hub-Signature-256 and queues new comments and issues that mention the bot.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL