github

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package github provides a GitHub skill for interacting with GitHub repositories.

This skill provides tools for managing issues, pull requests, and searching code. Authentication is via a GitHub personal access token.

Example usage:

import "github.com/plexusone/omni-github/omniskill/github"

skill := github.New(github.Config{
	Token: os.Getenv("GITHUB_TOKEN"),
})
if err := skill.Init(ctx); err != nil {
	log.Fatal(err)
}
defer skill.Close()

// Use with an agent
agent.RegisterSkill(skill)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Token is the GitHub personal access token.
	// Required for authenticated API access.
	Token string

	// BaseURL is the GitHub API base URL.
	// Defaults to https://api.github.com for github.com.
	// Set to your GitHub Enterprise URL for GHE (e.g., https://github.mycompany.com/api/v3).
	BaseURL string

	// DefaultOwner is the default repository owner for operations.
	// Can be overridden per-tool call.
	DefaultOwner string

	// DefaultRepo is the default repository name for operations.
	// Can be overridden per-tool call.
	DefaultRepo string
}

Config configures the GitHub skill.

type Skill

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

Skill provides GitHub integration tools.

func New

func New(config Config) *Skill

New creates a new GitHub skill with the given configuration.

func (*Skill) Close

func (s *Skill) Close() error

Close releases resources.

func (*Skill) Description

func (s *Skill) Description() string

Description returns the skill description.

func (*Skill) Init

func (s *Skill) Init(ctx context.Context) error

Init initializes the GitHub client.

func (*Skill) Name

func (s *Skill) Name() string

Name returns the skill name.

func (*Skill) Tools

func (s *Skill) Tools() []skill.Tool

Tools returns the GitHub tools.

Jump to

Keyboard shortcuts

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