github

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 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 Adapter

type Adapter interface {
	// CreatePullRequest runs `gh pr create`
	CreatePullRequest(ctx context.Context, title string, body string) (string, error)
	// GetIssueDetails fetches basic details for a given issue ID
	GetIssueDetails(ctx context.Context, issueID string) (title string, body string, err error)
}

Adapter defines the interface for GitHub CLI operations

type MockAdapter

type MockAdapter struct {
	MockPRURL      string
	MockIssueTitle string
	MockIssueBody  string
	MockError      error
}

MockAdapter provides a mock implementation for testing

func NewMockAdapter

func NewMockAdapter() *MockAdapter

NewMockAdapter creates a new mock adapter with sample data

func (*MockAdapter) CreatePullRequest

func (m *MockAdapter) CreatePullRequest(ctx context.Context, title string, body string) (string, error)

CreatePullRequest implements the Adapter interface with mock data

func (*MockAdapter) GetIssueDetails

func (m *MockAdapter) GetIssueDetails(ctx context.Context, issueID string) (string, string, error)

GetIssueDetails implements the Adapter interface with mock data

Jump to

Keyboard shortcuts

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