github

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package github adapts GitHub (cloud or enterprise) to the platform interface: org webhook parsing and repo discovery.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHub

type GitHub struct {
	// contains filtered or unexported fields
}

GitHub implements platform.Platform for github.com or GitHub Enterprise.

func New

func New(cfg config.Platform, log *slog.Logger) (*GitHub, error)

New builds a GitHub adapter from its platform config section.

func (*GitHub) DiscoverRepos

func (g *GitHub) DiscoverRepos(ctx context.Context) ([]platform.Repo, error)

DiscoverRepos lists all repos of the configured orgs, honoring the archived filter.

func (*GitHub) Name

func (g *GitHub) Name() string

Name returns the platform's configured name.

func (*GitHub) ParseWebhook

func (g *GitHub) ParseWebhook(r *http.Request, body []byte) (*platform.Event, error)

ParseWebhook verifies the HMAC signature and maps supported events (edited PR/issue with newly checked boxes, default-branch push) to a run request; unsupported or irrelevant events return (nil, nil).

func (*GitHub) Schedule

func (g *GitHub) Schedule() config.Schedule

Schedule returns the platform's cron configuration.

func (*GitHub) WebhookPath

func (g *GitHub) WebhookPath() string

WebhookPath returns the HTTP path this platform's webhooks arrive on.

Jump to

Keyboard shortcuts

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