reviewhost

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package reviewhost publishes reviewed RoleMux candidates to optional human review surfaces. GitHub support uses the installed git and gh CLIs, and never owns credentials.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnavailable = errors.New("GitHub review is unavailable")

Functions

This section is empty.

Types

type Feedback

type Feedback struct {
	Text   string
	Review task.ExternalReview
}

type GitHub

type GitHub struct {
	RepoRoot string
	GitPath  string
	GHPath   string
	Env      []string
	Process  runner.ProcessFunc
	Now      func() time.Time
}

GitHub is an injectable host adapter. Production uses RunProcess; tests can intercept only network-mutating push/gh calls while retaining real local Git.

func NewGitHub

func NewGitHub(repoRoot string, environ []string) (*GitHub, error)

func (*GitHub) Check

func (g *GitHub) Check(ctx context.Context, preferredRemote string) (remoteInfo, error)

Check verifies the local prerequisites without changing repository or remote state.

func (*GitHub) FetchFeedback

func (g *GitHub) FetchFeedback(ctx context.Context, review task.ExternalReview) (Feedback, error)

FetchFeedback reads only comments/reviews newer than the saved cursors. The caller decides whether importing them means request_changes.

func (*GitHub) Publish

func (g *GitHub) Publish(ctx context.Context, st task.State, record task.ApprovalRecord) (task.ExternalReview, error)

Publish creates or updates one review-only draft PR without touching the user's current branch, index, or worktree.

Jump to

Keyboard shortcuts

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