github

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

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

func NewAPIClient

func NewAPIClient(owner, repo, token string) *APIClient

func (*APIClient) AddComment

func (c *APIClient) AddComment(issueNumber int, comment string) error

func (*APIClient) CreateIssue

func (c *APIClient) CreateIssue(issue *Issue) error

func (*APIClient) GetRepository

func (c *APIClient) GetRepository() (owner, name string)

func (*APIClient) UpdateIssueWithDependencies

func (c *APIClient) UpdateIssueWithDependencies(issue *Issue, issueNumberMap map[string]int) error

type APICommentRequest

type APICommentRequest struct {
	Body string `json:"body"`
}

type APIIssueRequest

type APIIssueRequest struct {
	Title     string   `json:"title"`
	Body      string   `json:"body,omitempty"`
	Labels    []string `json:"labels,omitempty"`
	Assignees []string `json:"assignees,omitempty"`
}

type APIIssueResponse

type APIIssueResponse struct {
	Number int    `json:"number"`
	Title  string `json:"title"`
	URL    string `json:"html_url"`
}

type CLIClient

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

func NewCLIClient

func NewCLIClient(owner, repo string) *CLIClient

func (*CLIClient) AddComment

func (c *CLIClient) AddComment(issueNumber int, comment string) error

AddComment adds a comment to an existing issue

func (*CLIClient) CreateIssue

func (c *CLIClient) CreateIssue(issue *Issue) error

func (*CLIClient) CreateLabel added in v0.2.0

func (c *CLIClient) CreateLabel(name, description, color string) error

CreateLabel creates a new label in the repository

func (*CLIClient) GetRepository

func (c *CLIClient) GetRepository() (owner, name string)

func (*CLIClient) LabelExists added in v0.2.0

func (c *CLIClient) LabelExists(name string) (bool, error)

LabelExists checks if a label exists in the repository

func (*CLIClient) UpdateIssueWithDependencies

func (c *CLIClient) UpdateIssueWithDependencies(issue *Issue, issueNumberMap map[string]int) error

UpdateIssueWithDependencies updates an issue with dependency information

type Client

type Client interface {
	CreateIssue(issue *Issue) error
	GetRepository() (owner, name string)
}

type DependencyClient

type DependencyClient interface {
	Client
	UpdateIssueWithDependencies(issue *Issue, issueNumberMap map[string]int) error
}

type Environment

type Environment struct {
	HasGitHubCLI    bool
	IsAuthenticated bool
	IsGitRepository bool
	RepositoryOwner string
	RepositoryName  string
	PreferredMethod string // "cli" or "api"
}

func DetectEnvironment

func DetectEnvironment() (*Environment, error)

func (*Environment) String

func (e *Environment) String() string

type Issue

type Issue struct {
	ID        string // Unique ID from the input file
	Title     string
	Body      string
	Labels    []string
	Assignees []string
	DependsOn []string // IDs of issues this depends on
	Blocks    []string // IDs of issues this blocks
	Related   []string // IDs of related issues
	Number    int      // GitHub issue number after creation
}

type LabelClient added in v0.2.0

type LabelClient interface {
	Client
	CreateLabel(name, description, color string) error
	LabelExists(name string) (bool, error)
}

Jump to

Keyboard shortcuts

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