helper

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

type Feature string

Feature represents an AI assistant feature

const (
	FeatureComment Feature = "comment" // AI analysis comments
	FeatureLabel   Feature = "label"   // Label suggestions
)

type GitHubEvent

type GitHubEvent struct {
	Action string `json:"action"`
	Issue  struct {
		Number int    `json:"number"`
		Title  string `json:"title"`
		Body   string `json:"body"`
	} `json:"issue"`
	Repository struct {
		Owner struct {
			Login string `json:"login"`
		} `json:"owner"`
		Name string `json:"name"`
	} `json:"repository"`
}

GitHubEvent represents the structure of a GitHub issue event

type Helper

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

Helper is the main struct that holds the clients and services

func NewHelper

func NewHelper(opts ...Option) (*Helper, error)

NewHelper creates a new Helper instance with the given options

func (*Helper) Help

func (h *Helper) Help(ctx context.Context)

Help processes a GitHub issue event and provides AI-powered assistance

type Option

type Option func(*Helper) error

Option is a function type that modifies Helper

func WithAIService

func WithAIService(aiType string, apiKey string) Option

WithAIService sets the AI service

func WithFeatures

func WithFeatures(features []Feature) Option

WithFeatures sets the enabled features

func WithGitHubClient

func WithGitHubClient(token string) Option

WithGitHubClient sets the GitHub client

func WithGitHubEventPath

func WithGitHubEventPath(path string) Option

WithGitHubEventPath sets the GitHub event path

Jump to

Keyboard shortcuts

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