github

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Name string
	Uses string
}

Action represents a GitHub action reference from a workflow file

type Client

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

Client provides access to GitHub API

func NewClient

func NewClient(token string) *Client

NewClient creates a new GitHub client with the provided token

func (*Client) ActionsForOrg

func (c *Client) ActionsForOrg(ctx context.Context, org string) (map[string][]Action, error)

ActionsForOrg retrieves all actions used across an organization's repositories

func (*Client) GetActions

func (c *Client) GetActions(ctx context.Context, owner, repo string) ([]Action, error)

GetActions retrieves all actions used in workflow files for a repository

func (*Client) GetRepositoryContent

func (c *Client) GetRepositoryContent(ctx context.Context, owner, repo, path string) ([]byte, error)

GetRepositoryContent retrieves file content from a repository

func (*Client) ListRepositories

func (c *Client) ListRepositories(ctx context.Context, org string) ([]Repository, error)

ListRepositories retrieves all repositories for an organization

type Repository

type Repository struct {
	Name        string
	FullName    string
	Description string
	IsPrivate   bool
}

Repository represents a GitHub repository with basic information

Jump to

Keyboard shortcuts

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