github

package
v0.0.0-...-c4df1b1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubForge

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

func NewGitHubForge

func NewGitHubForge(appID int64, privateKey []byte, webhookSecret string) *GitHubForge

func (*GitHubForge) AvailableAfter

func (g *GitHubForge) AvailableAfter() time.Time

AvailableAfter returns the time when the forge is available for requests.

func (*GitHubForge) CanHandle

func (g *GitHubForge) CanHandle(link string) bool

CanHandle checks if this forge can handle GitHub URLs

func (*GitHubForge) CloneCredentials

func (g *GitHubForge) CloneCredentials(ctx context.Context, repo string) (*forge.Credentials, error)

func (*GitHubForge) CreatePullRequest

func (g *GitHubForge) CreatePullRequest(ctx context.Context, repo, baseBranch, headBranch, title, body string) (string, error)

func (*GitHubForge) FindOpenPullRequest

func (g *GitHubForge) FindOpenPullRequest(ctx context.Context, repo, headBranch string) (string, error)

func (*GitHubForge) GetCIEnv

func (g *GitHubForge) GetCIEnv(run forge.ForgeRun) map[string]string

func (*GitHubForge) GetDefaultBranch

func (g *GitHubForge) GetDefaultBranch(ctx context.Context, repo string) (string, error)

func (*GitHubForge) GetRun

func (g *GitHubForge) GetRun(ctx context.Context, link string) (forge.ForgeRun, error)

GetRun resolves a link into a ForgeRun

func (*GitHubForge) GetVariables

func (g *GitHubForge) GetVariables(ctx context.Context, repo string) (map[string]string, error)

func (*GitHubForge) ProcessWebhook

func (g *GitHubForge) ProcessWebhook(r *http.Request) (string, error)

ProcessWebhook parses the webhook to extract the canonical link

func (*GitHubForge) UpdateStatus

func (g *GitHubForge) UpdateStatus(ctx context.Context, repo, sha string, status forge.Status) error

func (*GitHubForge) UploadReleaseAsset

func (g *GitHubForge) UploadReleaseAsset(ctx context.Context, repo, tag, name string, data io.Reader) error

type Run

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

func (*Run) Author

func (r *Run) Author() string

func (*Run) Branch

func (r *Run) Branch() string

func (*Run) CIEnv

func (r *Run) CIEnv() map[string]string

func (*Run) CloneURL

func (r *Run) CloneURL() string

func (*Run) CommitMessage

func (r *Run) CommitMessage() string
func (r *Run) Link() string

func (*Run) Ref

func (r *Run) Ref() string

func (*Run) Repo

func (r *Run) Repo() string

func (*Run) SHA

func (r *Run) SHA() string

func (*Run) Type

func (r *Run) Type() forge.EventType

func (*Run) UpdateStatus

func (r *Run) UpdateStatus(ctx context.Context, status forge.Status) error

Jump to

Keyboard shortcuts

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