githubapi

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 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 CreatePRDescription

func CreatePRDescription(changeInfo config.ChangeInfo) string

CreatePRDescription renders the body of the PR to be created.

func CreatePullRequest

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

CreatePullRequest creates a PR for an update of dependabot.yml

func GetFileContent

func GetFileContent(client *github.Client, org string, repo string, path 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