github

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFileURL added in v0.0.4

func GenerateFileURL(repoURL, filePath string, lineNumber int) string

GenerateFileURL creates a GitHub URL pointing to a specific line in a file

func IsGitHubRepository added in v0.0.4

func IsGitHubRepository(repoURL string) bool

IsGitHubRepository checks if a repository URL is a GitHub repository

func ParseRepositoryURL

func ParseRepositoryURL(repoURL string) (owner, repo string, err error)

ParseRepositoryURL parses a GitHub repository URL

Types

type Client

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

Client represents a GitHub API client

func NewClient

func NewClient() *Client

NewClient creates a new GitHub API client

func (*Client) CloneRepository

func (c *Client) CloneRepository(repoURL, destDir string) (string, error)

CloneRepository clones a GitHub repository to a local directory

func (*Client) CloneRepositoryWithProgress added in v0.0.4

func (c *Client) CloneRepositoryWithProgress(repoURL, destDir string, showProgress bool, progressCallback func(progress int, stage string)) (string, error)

CloneRepositoryWithProgress clones a GitHub repository with optional progress reporting

func (*Client) CreateCheckRun

func (c *Client) CreateCheckRun(owner, repo, sha string, findings []string) error

CreateCheckRun creates a GitHub check run for a commit

func (*Client) CreateIssueComment

func (c *Client) CreateIssueComment(owner, repo string, number int, body string) error

CreateIssueComment creates a comment on a GitHub issue or pull request

func (*Client) DiscoverOrganizationRepositories added in v0.0.4

func (c *Client) DiscoverOrganizationRepositories(orgName string, filter interface{}) ([]RepositoryInfo, error)

DiscoverOrganizationRepositories discovers all repositories in a GitHub organization

func (*Client) DownloadWorkflowFiles

func (c *Client) DownloadWorkflowFiles(owner, repo, destDir string) ([]string, error)

DownloadWorkflowFiles downloads workflow files to a local directory

func (*Client) GetWorkflowFiles

func (c *Client) GetWorkflowFiles(owner, repo string) ([]*github.RepositoryContent, error)

GetWorkflowFiles gets the GitHub Actions workflow files from a repository

type RepositoryInfo added in v0.0.4

type RepositoryInfo struct {
	Name        string `json:"name"`
	FullName    string `json:"full_name"`
	URL         string `json:"url"`
	CloneURL    string `json:"clone_url"`
	IsPrivate   bool   `json:"is_private"`
	IsFork      bool   `json:"is_fork"`
	IsArchived  bool   `json:"is_archived"`
	Language    string `json:"language,omitempty"`
	Description string `json:"description,omitempty"`
	UpdatedAt   string `json:"updated_at,omitempty"`
}

RepositoryInfo represents basic information about a repository

Jump to

Keyboard shortcuts

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