githubapi

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 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 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