Documentation
¶
Overview ¶
Package github integrates Skiff with a GitHub App: it drives the app-manifest creation flow, mints installation access tokens, lists installed repos, builds authenticated clone URLs, and verifies incoming webhooks.
Index ¶
- func Manifest(baseURL, name string) string
- func VerifySignature(secret string, body []byte, sig string) bool
- type Config
- func (c *Config) CloneURLWithToken(cloneURL string) (string, error)
- func (c *Config) Configured() bool
- func (c *Config) InstallURL() string
- func (c *Config) InstallationToken() (string, error)
- func (c *Config) Installed() bool
- func (c *Config) ListRepos() ([]Repo, error)
- func (c *Config) Save() error
- type Push
- type Repo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
ID int64 `json:"id"`
Slug string `json:"slug"`
PEM string `json:"pem"`
WebhookSecret string `json:"webhook_secret"`
ClientID string `json:"client_id"`
ClientSecret string `json:"client_secret"`
InstallationID int64 `json:"installation_id"`
}
Config is the persisted GitHub App: its identity, private key, secrets, and the installation it's bound to. Stored 0600 at ~/.skiff/github.json.
func ConvertManifest ¶
ConvertManifest exchanges the temporary manifest code for the app credentials.
func (*Config) CloneURLWithToken ¶
CloneURLWithToken returns an authenticated https clone URL for private repos.
func (*Config) Configured ¶
func (*Config) InstallURL ¶
func (*Config) InstallationToken ¶
InstallationToken returns a cached installation access token (1h TTL).
Click to show internal directories.
Click to hide internal directories.