Documentation
¶
Index ¶
- func GenerateFileURL(repoURL, filePath string, lineNumber int) string
- func GenerateFileURLWithBranch(repoURL, filePath string, lineNumber int, branch string) string
- func IsGitHubRepository(repoURL string) bool
- func ParseRepositoryURL(repoURL string) (owner, repo string, err error)
- type Client
- func (c *Client) CloneRepository(repoURL, destDir string) (string, error)
- func (c *Client) CloneRepositoryWithBranch(repoURL, destDir, branch string) (string, error)
- func (c *Client) CloneRepositoryWithProgress(repoURL, destDir string, showProgress bool, ...) (string, error)
- func (c *Client) CloneRepositoryWithProgressAndBranch(repoURL, destDir, branch string, showProgress bool, ...) (string, error)
- func (c *Client) CreateCheckRun(owner, repo, sha string, findings []string) error
- func (c *Client) CreateIssueComment(owner, repo string, number int, body string) error
- func (c *Client) DiscoverOrganizationRepositories(orgName string, filter interface{}) ([]RepositoryInfo, error)
- func (c *Client) DownloadWorkflowFiles(owner, repo, destDir string) ([]string, error)
- func (c *Client) GetDefaultBranch(owner, repo string) (string, error)
- func (c *Client) GetWorkflowFiles(owner, repo string) ([]*github.RepositoryContent, error)
- func (c *Client) GetWorkflowFilesContents(owner, repo string) (map[string][]byte, error)
- type RepositoryFilter
- type RepositoryInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateFileURL ¶ added in v0.0.4
GenerateFileURL creates a GitHub URL pointing to a specific line in a file
func GenerateFileURLWithBranch ¶ added in v0.0.7
GenerateFileURLWithBranch creates a GitHub URL using an explicit branch name (no SHA).
func IsGitHubRepository ¶ added in v0.0.4
IsGitHubRepository checks if a repository URL is a GitHub repository
func ParseRepositoryURL ¶
ParseRepositoryURL parses a GitHub repository URL
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a GitHub API client
func NewClientWithSmartAuth ¶ added in v0.0.5
NewClientWithSmartAuth creates a GitHub client with intelligent authentication
func NewClientWithToken ¶ added in v0.0.5
NewClientWithToken creates a new GitHub API client with the provided token
func (*Client) CloneRepository ¶
CloneRepository clones a GitHub repository to a local directory
func (*Client) CloneRepositoryWithBranch ¶ added in v1.0.1
CloneRepositoryWithBranch clones a specific branch of a GitHub repository
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) CloneRepositoryWithProgressAndBranch ¶ added in v1.0.1
func (c *Client) CloneRepositoryWithProgressAndBranch(repoURL, destDir, branch string, showProgress bool, progressCallback func(progress int, stage string)) (string, error)
CloneRepositoryWithProgressAndBranch clones a GitHub repository with optional progress reporting and branch selection
func (*Client) CreateCheckRun ¶
CreateCheckRun creates a GitHub check run for a commit
func (*Client) CreateIssueComment ¶
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 ¶
DownloadWorkflowFiles downloads workflow files to a local directory
func (*Client) GetDefaultBranch ¶ added in v1.0.1
GetDefaultBranch gets the default branch name for a repository
func (*Client) GetWorkflowFiles ¶
func (c *Client) GetWorkflowFiles(owner, repo string) ([]*github.RepositoryContent, error)
GetWorkflowFiles gets the GitHub Actions workflow files from a repository
type RepositoryFilter ¶ added in v0.0.5
type RepositoryFilter struct {
IncludeForks bool // Include forked repositories
IncludeArchived bool // Include archived repositories
IncludePrivate bool // Include private repositories
IncludePublic bool // Include public repositories
MaxRepos int // Maximum number of repositories to analyze (0 = no limit)
NameFilter string // Regular expression to filter repository names
}
RepositoryFilter defines criteria for filtering repositories during organization analysis
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