githubapi

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package githubapi contains functionality related to the GitHub API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDirectoryExists added in v0.7.0

func CheckDirectoryExists(client *github.Client, org string, repo string, directory string, branchName string) (bool, error)

CheckDirectoryExists checks if a directory exists in the remote GitHub repository.

func CheckRateLimit added in v0.8.3

func CheckRateLimit(client *github.Client, minRemaining int) (bool, int, error)

CheckRateLimit checks if there are enough GitHub API requests remaining.

func CreateOrUpdatePullRequest added in v0.3.0

func CreateOrUpdatePullRequest(client *github.Client, org string, repo string, baseBranch string, prDesc string, content string, toolConfig config.ToolConfig) error

CreateOrUpdatePullRequest creates or updates a PR for changes in dependabot.yml

func CreatePRDescription

func CreatePRDescription(changeInfo config.ChangeInfo) string

CreatePRDescription renders the body of the PR to be created.

func GetFileContent

func GetFileContent(client *github.Client, org string, repo string, path string, branchName string) ([]byte, error)

GetFileContent returns the content of a file

func GetGitHubClient

func GetGitHubClient(accessToken string) *github.Client

GetGitHubClient returns a GitHub client for API calls

func GetRepoFileList

func GetRepoFileList(client *github.Client, org string, repo string, defaultBranch string) []string

GetRepoFileList returns a list (strings) of all files in a repo, including their path.

func GetRepository

func GetRepository(client *github.Client, org string, repo string) (*github.Repository, error)

GetRepository gets a repository object.

Types

This section is empty.

Jump to

Keyboard shortcuts

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