github

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnablePages

func EnablePages(owner, repo string) error

EnablePages enables GitHub Pages on a repository with workflow-based deployment. Uses the `gh` CLI which handles authentication via existing user session.

func PagesEndpoint

func PagesEndpoint(owner string) string

PagesEndpoint returns the canonical GitHub Pages hostname for an organization. e.g., "vitruviansoftware" → "vitruviansoftware.github.io"

func RepoInfo

func RepoInfo() (owner, repo string, err error)

RepoInfo extracts the owner and repo name from the current git working directory.

func SetCustomDomain added in v0.17.1

func SetCustomDomain(owner, repo, domain string) error

SetCustomDomain configures the custom domain on GitHub Pages and triggers SSL certificate provisioning via Let's Encrypt. Requires the domain to be verified at the org level first (done via GitHub UI).

Types

type DomainNotVerifiedError added in v0.17.1

type DomainNotVerifiedError struct {
	Domain string
	Owner  string
}

DomainNotVerifiedError indicates the domain needs org-level verification in GitHub UI.

func (*DomainNotVerifiedError) Error added in v0.17.1

func (e *DomainNotVerifiedError) Error() string

type HTTPSCert added in v0.18.0

type HTTPSCert struct {
	State       string   `json:"state"`       // "approved", "pending", "new", "errored"
	Description string   `json:"description"` // Human-readable status
	Domains     []string `json:"domains"`
	ExpiresAt   string   `json:"expires_at"`
}

HTTPSCert holds the SSL certificate details.

type PagesStatus added in v0.18.0

type PagesStatus struct {
	CNAME         string     `json:"cname"`
	Status        string     `json:"status"` // "built", "building", etc.
	HTMLURL       string     `json:"html_url"`
	HTTPSEnforced bool       `json:"https_enforced"`
	DomainState   string     `json:"protected_domain_state"` // "verified", "unverified", "pending"
	HTTPSCert     *HTTPSCert `json:"https_certificate"`
}

PagesStatus holds the current state of GitHub Pages for a repository.

func GetPagesStatus added in v0.18.0

func GetPagesStatus(owner, repo string) (*PagesStatus, error)

GetPagesStatus retrieves the current GitHub Pages configuration and SSL status.

Jump to

Keyboard shortcuts

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