remote

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckRun

type CheckRun struct {
	Name       string
	Status     string // queued, in_progress, completed
	Conclusion string // success, failure, cancelled, skipped
	URL        string
}

CheckRun represents a GitHub Actions check run

type Job

type Job struct {
	Name       string
	Status     string // queued, in_progress, completed
	Conclusion string // success, failure, cancelled, skipped
}

Job represents a job within a workflow

type PRChecks

type PRChecks struct {
	TotalCount   int
	Pending      int
	Success      int
	Failure      int
	Status       string // pending, success, failure
	Checks       []CheckRun
	StatusChecks []StatusCheck
}

PRChecks represents the status of all checks for a PR

type PRChecksUpdate

type PRChecksUpdate struct {
	Checks *PRChecks
	Error  error
}

PRChecksUpdate represents a PR checks status update

type Provider

type Provider interface {
	// GetLatestWorkflow returns the most recent workflow run for a branch
	GetLatestWorkflow(ctx context.Context, branch string) (*Workflow, error)

	// WatchWorkflow streams updates for a running workflow
	WatchWorkflow(ctx context.Context, workflowID string) (<-chan WorkflowUpdate, error)

	// CreatePullRequest creates a new pull request
	CreatePullRequest(ctx context.Context, title, body, head, base string, draft bool) (number int, url string, err error)

	// MarkPullRequestReady marks a draft PR as ready for review
	MarkPullRequestReady(ctx context.Context, prNumber int) error

	// GetPullRequestByBranch finds a PR for the given head branch
	GetPullRequestByBranch(ctx context.Context, branch string) (number int, url string, err error)

	// MergePullRequest merges a pull request
	MergePullRequest(ctx context.Context, prNumber int, method string) error

	// GetPullRequestChecks returns the status of all checks/workflows for a PR
	GetPullRequestChecks(ctx context.Context, prNumber int) (*PRChecks, error)

	// WatchPullRequestChecks streams updates for PR checks until all complete
	WatchPullRequestChecks(ctx context.Context, prNumber int) (<-chan PRChecksUpdate, error)
}

Provider is the interface for CI/CD providers (GitHub, GitLab, etc.)

type StatusCheck

type StatusCheck struct {
	Context string
	State   string // pending, success, failure, error
	URL     string
}

StatusCheck represents a commit status check

type Workflow

type Workflow struct {
	ID         string
	Status     string // queued, in_progress, completed
	Conclusion string // success, failure, cancelled, skipped
	Jobs       []Job
	URL        string
}

Workflow represents a CI/CD workflow run

type WorkflowUpdate

type WorkflowUpdate struct {
	Workflow *Workflow
	Error    error
}

WorkflowUpdate represents a workflow status update

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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